Community Tech/Commons deletion notification bot
This page documents a project the Wikimedia Foundation's Community Tech team has worked on or declined in the past. Technical work on this project is complete.
We invite you to join the discussion on the talk page. You may track this project's progress on T167614.
This is the project page for Commons deletion notification bot, the #10 wish in the 2017 Community Wishlist Survey. The project is now complete and you can request for it to be enabled on your project.
How it works
[edit]When a file on Wikimedia Commons is nominated for deletion, the Community Tech bot account posts on talk pages of articles using that image about the impending file deletion. The bot only posts on the first 10 talk pages on a wiki if the image is being used on more than 10 wiki pages to prevent spam (such as when an image being used in a template is nominated for deletion).
Request to enable on a project
[edit]Hi! If you would like the Commons deletion notification bot to be enabled on your project, please create a phabricator task and add a 'community-tech' tag. Initial wikis were also included after comments on this task. We'd appreciate your help in getting the bot approved on your wiki and for getting the bot message strings translated.
Status
[edit]August 10, 2018
[edit]The bot is now translatable using TranslateWiki. The work to rollout the bot to more languages is being tracked in task T190233.
July 28, 2018
[edit]The bot is happily working on English wikipedia without any major feedback so far. We're working on making the bot translatable so we can enable it on more projects.
May 30, 2018
[edit]Progress is still chugging along! We're currently running a trial of the bot on English Wikipedia (request for approval here) and have found a few hiccups we need to address before a full release, such as an obnoxious bug where the bot will post multiple sections on the same talk page (phab:T195629). We're also considering how to enable this on all the wikis that want it in phab:T190233.
Community Tech is currently focusing all attention on another 6-week project so development will resume in July. We hope to have the bot completed by the end of July or early August.
April 26, 2018
[edit]Development of the bot is in progress, but it's prioritized second to other Community Tech projects. We've made it a team goal to complete it by the end of June.
We've decided on the text that the bot will post, based on input in the Phabricator task. For files marked with regular deletion:
== A Commons file used on this article has been nominated for deletion == The file [[commons:File:Foobar.jpg|Foobar.jpg]] on Wikimedia Commons has been nominated for deletion. View and participate in the deletion discussion at the [[commons:Commons:Deletion requests/File:Foobar.jpg|nomination page]]. — ~~~~
For speedy deletion:
== A Commons file used on this article has been nominated for speedy deletion ==
The file [[commons:File:Foobar.jpg|Foobar.jpg]] on Wikimedia Commons has been nominated for speedy deletion. View the deletion reason at the [[commons:File:Foobar.jpg|Commons file page]]. — ~~~~
Perhaps the biggest change that's been made is that this bot will be opt-in rather than our initial idea to make it opt-out. This means that a wiki will need to proactively ask to have it enabled. We will still send word that it's available and invite all wikis to request it to be enabled. Each local wiki will need one (or more) administrators who will be responsible for the bot if any questions, discussions, or problems arise. (Blocking the bot will stop it from posting, as usual, in any urgent situations.) For now, we'll take requests to have the bot enabled on this article's talk page. We're looking for initial wikis to test on, so please sign up whenever you're ready!
March 20, 2018
[edit]We've made some decisions about the bot. The current requirements are listed below at #Requirements but are open to changing them based on your feedback on the talk page or at phab:T188151. Here's what we decided:
- Messages will be stored as messages and translatable via TranslateWiki.net. This means that the messages will display in the wiki's language but will not be customizable per wiki.
- If a file is used on more than 10 pages, the bot will only post on 10 talk pages, to minimize spam.
- The bot will only identify files used on NS:0 (mainspace). We can add additional namespaces in the future if the need arises.
- We will need to determine a limited testing plan and rollout plan (opt-in or opt-out) in phab:T190233.
- We are planning to run the bot with
User:Community Tech bot
which we will have marked as a global bot in phab:T190234. - We are also discussing what words should be used in the message at phab:T188148. Please give your input!
March 16, 2018
[edit]This project is still in development, in addition to other Wishlist projects. We hope to complete development by July 2018.
February 23, 2018
[edit]Subtasks have been created, and a first draft of requirements has been posted at #Requirements below.
February 20, 2018
[edit]The investigation for this project has been completed. Notes can be found at phab:T184311.
We've emailed the author of a French Wikipedia bot about potential collaboration on this.
Next steps: write up the product requirements for this work and work with Max to split this into Phabricator tasks.
January 4, 2018
[edit]When a file is up for deletion on commons, this bot should alert the talk page of affected articles. This could possibly warn the talk pages of WikiProjects, but this is out of scope for the initial version of this bot. Version 1.0 of this bot will post a new section on the talk page of an article that uses the image if that image is nominated for deletion on Commons. If there is good response, we could think about extending the bot to notify pertinent WikiProjects.
We will need to consider how this bot will operate on wikis that use Flow (but will ignore LiquidThreads.)
This is just for deletion nomination, not other actions.
Translation should happen through translatewiki.
December 13, 2017
[edit]The team will start investigating this project early in 2018. If you've got suggestions or questions, please write your thoughts on the talk page!
Important links
[edit]- Wishlist proposal, discussion and votes
- Phabricator tickets tracking the work: phab:T167614 Related: phab:T91192
- Investigation: T184311
- Bot on French Wikipedia
- EN Wiki discussion (some users volunteered to help)
Requirements
[edit]- When an image on Commons is marked for deletion and it is embedded in a different wiki's article page, a bot should post an announcement.
- The bot should post a message on the talk page of the relevant article
- The message copy is below.
- The bot should run continuously, but operate on a slight delay to not spam for accidental posts or vandalism.
- There should be a 15 minute delay for speedy deletions
- There should be a 60 minute delay for regular deletion discussions
- Messages should be translatable via TranslateWiki.net, and will therefore be translated but not be customizable per wiki.
- If a file is used on more than 10 pages, the bot should only post on 10 talk pages maximum (as determined by the most Watchlisted pages)
- Should only identify files used on NS:0 (mainspace)
- Should use
User:Community Tech bot
Messages to post
[edit]For regular deletion:
== A Commons file used on this article has been nominated for deletion == The file [[commons:File:Foobar.jpg|Foobar.jpg]] on Wikimedia Commons has been nominated for deletion on 1 January 2000. View and participate in the deletion discussion at the [[commons:Commons:Deletion requests/File:Foobar.jpg|nomination page]]. — ~~~~
For speedy deletion:
== A Commons file used on this article has been nominated for speedy deletion == The file [[commons:File:Foobar.jpg|Foobar.jpg]] on Wikimedia Commons has been nominated for speedy deletion on 1 January 2000. View the deletion reason at the [[commons:File:Foobar.jpg|Commons file page]]. — ~~~~
Technical analysis
[edit]Detecting files nominated for deletion
[edit]- Speedy deletion: pages are nominated for deletion by slapping one of many templates and are put into Category:Candidates for speedy deletion or its subcategories. We might automatically update this list periodically. To differentiate between deletion categories and categories nominated for deletion, recursion should be restricted to categories containing
{{DeletionCategory}}
. - Normal deletion: discussion based deletion requests are mostly done with
{{delete}}
, files are placed into subcategories of Category:Deletion requests. To differentiate between suitable and not so suitable subcategories, search should be restricted toCategory:Deletion requests <month> <year>
without recursion.- The
reason
andsubpage
parameters (or first and second unnamed) could be used to get more information on deletion to report on other wikis.
- The
Proposed localization
[edit]Two principal possibilities: leaving templated messages or free text.
- Messages
- can be localized on TWN, the bot will leave wikitext afterwards.
Pros:
- One localization can be shared between all wikis in the same language.
- Easier to make opt-out based deployments: a wiki doesn't need to do anything to start receiving notifications, at most we could require that certain messages should be localized. Once these are done, you're immediately ready to receive notifications.
- Templates
- the bot leaves parameterized templates as messages.
Pros:
- Users love templates.
- Templates can be updated with more information, e.g. when deletion discussions are over.
- Can retroactively modify and improve old messages.
Cons:
- The templates need to be set up on each wiki in order for the bot to work.
- Updating the templates can break old messages.
Delayed notifications
[edit]Sometimes, pages are vandalized with frivolous deletion nominations. To reduce noise and workload, it has been proposed that notifications be delayed for a certain amount of time. I propose to start with 15 minutes delay for speedy deletion nominations and 1 hour for deletion discussions and adjust as we go.
Estimated number of pages to edit
[edit]Appears to be in the order of magnitude of 10k per month for deletion discussions. These numbers are smaller because some discussions have already concluded:
MariaDB [commonswiki_p]> select count(*) from globalimagelinks where gil_to in (select page_title from page, categorylinks where page_id=cl_from and page_namespace=6 and cl_to='Deletion_requests_December_2017'); +----------+ | count(*) | +----------+ | 3641 | +----------+ 1 row in set (0.09 sec) MariaDB [commonswiki_p]> select count(*) from globalimagelinks where gil_to in (select page_title from page, categorylinks where page_id=cl_from and page_namespace=6 and cl_to='Deletion_requests_January_2018'); +----------+ | count(*) | +----------+ | 7200 | +----------+ 1 row in set (2.30 sec)
See also
[edit]- User:Community Tech bot – the user that the tool runs as
- https://github.com/wikimedia/CommonsNotifier – tool source code
- phabricator:tag/commonsnotifier – issue tracking