Page MenuHomePhabricator

Investigate improving the tagging code
Closed, ResolvedPublic

Description

The code used to add change tags is not... pretty. The overall consequences structure is already going to be improved, but we first need to improve the 'tag' option. There are several things to improve:

  • Clean up the code to apply the abusefilter-condition-limit tag on stashed edits
  • The current action ID is unsafe, because keys are imploded with '-', which is a character allowed both in titles and usernames
  • We should investigate whether there's an alternative to using the aforementioned action ID, in favour of something more "predictable"
  • The 'tag' action should remain separate from the conds-limit tag, but they can share some code

Event Timeline

Change 633777 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Add a ChangeTagger class

https://gerrit.wikimedia.org/r/633777

Change 633733 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Simplify code for tagging the action on cache hit if the cond limit was hit

https://gerrit.wikimedia.org/r/633733

Change 633733 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Simplify code for tagging the action on cache hit if the cond limit was hit

https://gerrit.wikimedia.org/r/633733

Change 633777 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Add a ChangeTagger class

https://gerrit.wikimedia.org/r/633777