When a user JS page is edited by someone who is not the owner of that page, add a tag to the revision to indicate this.
Description
Details
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | None | T419623 Set up special logging/alerting when someone edits another user's JS | |||
| Resolved | Novem_Linguae | T420600 Add an edit tag when someone edits another user's user JS |
Event Timeline
Thank you for tagging this task with good first task for Wikimedia newcomers!
Newcomers often may not be aware of things that may seem obvious to seasoned contributors, so please take a moment to reflect on how this task might look to somebody who has never contributed to Wikimedia projects.
A good first task is a self-contained, non-controversial task with a clear approach. It should be well-described with pointers to help a completely new contributor, for example it should clearly point to the codebase URL and provide clear steps to help a contributor get set up for success. We've included some guidelines at https://phabricator.wikimedia.org/tag/good_first_task/ !
Thank you for helping us drive new contributions to our projects <3
(re criteria for this tag, cross-referencing to the discussion/s at T419623#11729244 & T420601#11735952)
I don't see a reason to limit edit tags to just common/global/etc, since edit tags are not spammy like notifications are. I think this ticket is ready for work.
Started working on this. A similar patch is https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1211147. Some of the tags automatically placed by core when editing a page are...
- mw-new-redirect
- mw-removed-redirect
- mw-changed-redirect-target
- mw-blank
- mw-replace
- mw-undo
- mw-manual-revert
- mw-reverted
I am poking around these code paths to see where a good insert point for this new tag is. Looks like undo is a job (RevertedTagUpdateJob.php) -- I'd like to avoid the complexity of a job if possible.
ChangeTagsStore->addTags() looks like the right method to use, or we can slip it into a $changeTags parameter supported by an existing method.
Change #1258144 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):
[mediawiki/core@master] ContentHandler: improve comment
Change #1258175 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):
[mediawiki/core@master] PageUpdater: Add "Edited other user's JS" tag when appropriate
Change #1258144 merged by jenkins-bot:
[mediawiki/core@master] ContentHandler: improve comment
The parent task T419152 covers both JS and CSS pages. Should this tagging patch (Change 1258175) also cover CONTENT_MODEL_CSS for consistency, or is that planned as a follow-up?
This ticket and its parent ticket (T419623)'s current scope is JS only, so that's what I coded up. We might want a separate ticket and discussion for CSS. Maybe create a ticket and link it here to get that discussion started.
Created T424179 to track CSS tagging as a follow-up, per @Novem_Linguae's suggestion.
Change #1258175 merged by jenkins-bot:
[mediawiki/core@master] PageUpdater: Add "Edited other user's JS" tag when appropriate
Change #1294349 had a related patch set uploaded (by Bartosz Dziewoński; author: Novem Linguae):
[mediawiki/core@REL1_46] PageUpdater: Add "Edited other user's JS" tag when appropriate
Change #1294349 merged by jenkins-bot:
[mediawiki/core@REL1_46] PageUpdater: Add "Edited other user's JS" tag when appropriate