Jump to content

MediaWiki talk:XTools-AutoEdits.json

Add topic
From Meta, a Wikimedia project coordination wiki
Latest comment: 6 days ago by Asukite in topic wAwB
XTools AutoEdits configuration
This page is used to request changes to configuration file that controls the XTools AutoEdits tool.

Only tools that are widely used should be included. Every tool added will slow down XTools a tiny bit more, so please be diligent and ensure the list doesn't become overly exhaustive.

Administrator instructions
Guidelines
  • Remember that only tools that are regularly and widely used should be included. Every addition here slows down the queries a tiny bit more. We cannot include any and every tool ever made. Also note that very similar tools can be combined to improve performance; for example the "delsort" tool for en.wikipedia includes multiple tools. You make the judgement call, but feel free to ask for help from other maintainers here if you are unsure.
  • Test your changes before saving. Do this by first updating MediaWiki:XTools-AutoEdits.json/sandbox with the desired changes. Then, login to XTools and append ?usesandbox=1 to any XTools AutoEdits result page to force it to use the sandbox. The easiest way is to test against accounts that have made edits using the tool you're trying to add, and look for contributions using only that tool. The requester should have shared example diffs.

    For example, if you wanted to add the tool "My Fun Tool" to de.wikipedia, which you know has been used by User:Example: Add the definition to the sandbox config, then load the contributions page for just that user and tool, as with:

    https://xtools.wmflabs.org/autoedits-contributions/de.wikipedia.org/Example?tool=My+Fun+Tool&usesandbox=1

    From here you can see if the qualifying edits show up. Compare with production (without ?usesandbox=1) as necessary. While you can use the sandbox on a normal /autoedits result page, loading just /autoedits-contributions is significantly faster.

    Note also that the ?usesandbox=1 option will bypass caching, so any changes to the sandbox should take effect immediately. Changes to the production configuration are cached for up to 20 minutes, so be patient for them to take effect.

  • If you need help with testing regex itself, there are some external tools for this such as regex101.com (just make sure to test against the PCRE flavor, which is the default).
Performance tips
  • Try to keep the regex simple and short without allowing it to be too broad. For example, Huggle edits in English contain ([[WP:HG|HG]]) in the summary but the regex we use is \(\[\[WP:HG, since the piped part of the link isn't needed to safely conclude it is a Huggle edit.
  • Use tags wherever possible as they are significantly more efficient to query. Sometimes you have to include regex to account for edits made before the tag was introduced, in which case you should include both regex and the tag.
  • Restrict to applicable namespaces where possible, especially if the tool is not used in the mainspace or other popular namespaces.
Documentation

Please try to keep the definitions in the following order, with the entries sorted alphabetically:

  • Global list (nested the key "global")
    • List tools that are used extensively on multiple medium or large wikis. If only used on small wikis, it may be more efficient to list each of those individually for those wikis. Keep in mind any tools added under "global" are run for all wikis, and may unnecessarily slow down XTools on wikis that don't use those tools.
    • These tool definitions may include regular expressions, but should probably also include tags because the regex may not apply to non-English wikis.
    • You can also set wiki-specific regex that will get merged into the global regex (to override for each language, for example).
    • Other local values such as 'link', 'tag' and 'revert' are overridden, not merged into the global value.
    • See "Huggle" under "global" and "en.wikipedia.org" for an example.
  • Per-language list (such as "fr")
    • Key should match the ISO language code. All tools defined here will get ran for projects using that language.
    • These tool definitions generally only include native MediaWiki actions. For these, link to mediawiki.org documentation (e.g. mw:Special:MyLanguage/Help:Moving a page for the "Page move" tool).
    • The key should match the local name of the tool, and translations set using "label", along with the language-specific "regex" that goes with that tool.
  • Per-wiki list (such as "de.wikipedia.org")
    • Some definitions are only included to override values of global or per-language definitions.
Format for individual tool definitions

Either beneath "global", the language list (such as "fr") or under a wiki (such as "de.wikisource"), use any the following (only "regex" or "tag" are required):

  • Tool name (such as "Twinkle")
    • "regex" – Regular expression to match against edit summary. This follows PCRE format. Don't forget to escape regex literals using two backslash characters. For instance, to look for the link [[COM:FR|File renamed, you would use \\[\\[COM:FR\\|File renamed. Also shorten regex as much as possible. For example, the edit summary for "Undo" has changed over time – It could start with "undid", "undone" or "[[WP:UNDO|Undid]]", so our regex ends up looking like:
    ^(Undid|Undo|\\[\\[WP:UNDO\\|Undid\\]\\]) revision \\d+ by \\[\\[Special:(Contribs|Contributions)\\/.*?\\|.*?\\]\\]
    • "tags" – Names of tags applied to edits made using the tool, if applicable. See Special:Tags on the applicable wiki for full list.
    • "tag_excludes" – Don't count edits that also use this tag. This is used for example to hide Huggle edits when viewing Rollback edits. There are some known bugs, see phab:T191133. Please be careful using this option and test your changes thoroughly.
    • "link" – Wiki link to tool documentation. Full URLs or external links do NOT work, but interwiki do. Prefer official, multilingual documentation where possible (e.g. mw:Special:MyLanguage/Help:Moving a page instead of local documentation on moving pages). If no link exists, linking to the source code may be enough. If there's nowhere to link, it probably shouldn't be listed.
    • "label" – Text to use as the label for the tool, defaults to the tool's key. Use this for translations.
    • "revert" – If the tool is used only to revert edits (and not also issue talk page notifications, etc.), set this to true. If the tool is merely capable of reverting edits, set 'revert' to regex that would only account for such reverts. See the "Twinkle" entry for an example. The revert-only regex is necessary for the ArticleInfo and elsewhere in XTools, so as to differentiate edits that added content from edits that restored content.[1]
    • "contribs" – Set to true to include edits with the given tool in lists of non-automated contributions. For example, this is done for en.wikipedia's "ProveIt", because that tool often includes prose that was added by the user, and not entirely a semi-automated edit.
    • "namespaces" – The namespace IDs of where the tool is used. This is used to speed up the queries, so please use it where possible. Omit if the tool applies to all or most namespaces.
    • "talk_namespaces" – Set to only target talk namespaces.

For each tool definition, either "regex" or "tag" are required. In some cases you might want to include both, say if older versions of the tool did not add tags to the edits.

Responding to requests
  1. Ensure the tool meets the criteria outlined in the above guidelines.
  2. Test your changes first in the sandbox
  3. Make the changes to the production config.
  4. Mark the request as {{done}}


Notes

  1. However, XTools will eventually utilize the "reverted" tag to identify such edits, thus if the tool was introduced after September 2020 (after the "reverted" tag was introduced), it may not be necessary to set this option.
Request that a new (semi-)automated tool be added
SpBot archives all sections tagged with {{Section resolved|1=~~~~}} after 3 days.

Add afcrc-helper to English Wikipedia

[edit]

I Am Andumé (talk) 02:40, 13 March 2024 (UTC)Reply

Support but exclusion to tag mw-new-redirect needs to be added, as the script is mainly used for creating cats and redirects. ~/Bunnypranav:<ping> 11:32, 11 December 2024 (UTC)Reply
To any admins that might be looking into this. Kindly keep it on hold till phab:T382773 is resolved. If added now, it will duplicate into the Redirect tool as well. Thanks! ~/Bunnypranav:<ping> 09:17, 29 December 2024 (UTC)Reply
@Bunnypranav, we currently have the AFCRHS tool in the config already; maybe we can expand that to include this tool as well? (On that note, I think it should also include namespace 4, which I apparently missed here.) ~~~~
User:1234qwer1234qwer4 (talk)
16:23, 13 August 2025 (UTC)Reply
Yeah, should work. But again, it will in any case duplicate with Redirect tool. NS4 should also be there, yes. ~/Bunnypranav:<ping> 13:55, 14 August 2025 (UTC)Reply
I don't understand what specific edits are being asked to mark automated here. Using a script to create one redirect with one button press isn't really automated per se, and it seems you want to exclude those anyway via the tag exclusions. Is it just marking requests as done? If so, does anyone actually care about whether edits are marked automated or not outside mainspace. Please elaborate. * Pppery * it has begun 03:47, 22 February 2026 (UTC)Reply
(not the original request author) The script only creates redirects and marks the request as done. I do not think marking the handful edits to a single page even need to be automated, as you suggested. ~/Bunnypranav:<ping> 04:45, 22 February 2026 (UTC)Reply
(also not the original request author, but the script author) The script can allow for the creation of many redirects at once (alongside corresponding non-redirect talk pages), which would count as automated. It doesn't seem particularly necessary to tag the edits to the request pages (en:WP:AFC/R and en:WP:AFC/C) themselves.
I don't how how you'd modify the existing AFCRHS tagging, but this script is separate from that one (though it does perform effectively the same action), so I believe it should be marked separately. However, I'm not aware of precedent for that. ~ Eejit43 (talk) 05:26, 22 February 2026 (UTC)Reply
The redirect creation is already marked as automatic, under the "Redirect" semi automated tool. So the only edits left are to creation of its talk page right? ~/Bunnypranav:<ping> 05:45, 22 February 2026 (UTC)Reply
True, though would it not make sense to group them under afcrc-helper as well, or instead even? Again, I'm not sure of the precedent for all of this, so please correct me. But yes, the talk page of redirects and categories should be the only thing left that aren't tagged. ~ Eejit43 (talk) 05:57, 22 February 2026 (UTC)Reply
I was actually thinking if this addition is even necessary, just for those talk page edits, like the last sentence by Pppery. ~/Bunnypranav:<ping> 06:12, 22 February 2026 (UTC)Reply
I suppose it isn't totally necessary then though, no. It would just be nice to see what portion of redirects were created at the request of someone else, but that is only so important. I'll defer to those who are more familiar with this XTools feature. ~ Eejit43 (talk) 21:12, 22 February 2026 (UTC)Reply

Regex mistake for "bot revert"

[edit]

The regex currently reads:

"^Reverting possible (vandalism|test edit).*by.*\\(Bot|BOT( EDIT)?\\)$|^BOT (- )?(Reverted edits? by|rv)|^vandalism from \\[\\[.*?\\(\\d+\\) - reverted"

But it should be:

"^Reverting possible (vandalism|test edit).*by.*\\((Bot|BOT( EDIT)?)\\)$|^BOT (- )?(Reverted edits? by|rv)|^vandalism from \\[\\[.*?\\(\\d+\\) - reverted"

ie wrap Bot|BOT( EDIT)? in parentheses. Why:
The indented disjunction is

^Reverting possible (vandalism|test edit).*by.*\\(Bot|BOT( EDIT)?\\)$
|^BOT (- )?(Reverted edits? by|rv)
|^vandalism from \\[\\[.*?\\(\\d+\\) - reverted

but since Bot|BOT( EDIT)? is not parenthesed (the \( \) are literal parentheses and not groups), it's in fact

^Reverting possible (vandalism|test edit).*by.*\\(Bot
|BOT( EDIT)?\\)$
|^BOT (- )?(Reverted edits? by|rv)
|^vandalism from \\[\\[.*?\\(\\d+\\) - reverted

Which is woefully too permissive because it catches any summary that ends with BOT), which makes XTools call reverts random bot edits. (phab:T424790/[2]) — Alien  3
3 3
12:07, 29 April 2026 (UTC)Reply

Done NguoiDungKhongDinhDanh 16:09, 29 April 2026 (UTC)Reply

Add CVPI to enwiki

[edit]
  • Wiki: en.wikipedia.org
  • Name of tool: Interceptor
  • Links to example edits: [3], [4]
  • Link to the tool's documentation or homepage: en:w:WP:CVPI

The tag for the edits is CVPI. CVPI edits should also be excluded from generic rollback.

RandomPerson238 (talk) 19:07, 2 May 2026 (UTC)Reply

wAwB

[edit]

New web version of Auto Wiki Browser Asukite (talk) 18:38, 6 May 2026 (UTC)Reply