Extension:WikimediaEditorTasks

The WikimediaEditorTasks extension supports the Suggested Edits project of the Wikimedia Apps team. It provides an interface for defining specialized counters that tally edits per user with the desired characteristics. For example, a counter may be defined to count a user's edits via the wbsetdescription API module where the User-Agent begins with.

It exposes these counts through the wikimediaeditortaskscounts API module.

Config

 * $ : The database cluster in which the tables can be found. If, use the cluster of the current wiki. At Wikimedia, this is set to  . (Default:  )
 * $ : The database in which the tables can be found. If, use the current wiki database. At Wikimedia, this is set to  . (Default:  )
 * $ : List of enabled counter definitions, instantiated on demand by ObjectFactory. (Default: )
 * $ : Feature flag for edit streak counting. (Default: )
 * $ : Feature flag for revert counting. (Default: )

Development
The recommended development environment for WikimediaEditorTasks is MediaWiki-Vagrant (see "Installation" below). The  role pulls in the   and   roles, thereby automating a considerable amount of setup. (Note: A full development environment for Wikimedia requires setting up CentralAuth, WikibaseMediaInfo (Vagrant role ), and Wikidata. This requires either setting up the full environment manually, following the instructions for each extension, or hacking around conflicts between the   and   Vagrant roles.)

Conceptually, the extension is very simple: it provides an abstract  base class that developers can subclass to implement logic defining whether to keep count of a given revision (and reverts to such revisions) per user. Counters may be registered in. On PageSaveComplete, WikimediaEditorTasks iterates through each registered counter and determines whether the user's count should be iterated. If the new revision undoes another revision, the undone revision is examined to see if the undone revision author's count should be decremented. Revisions are also evaluated for possible decrementing for each registered counter on RollbackComplete.

The extension provides a few  counters implementing the specific logic required by Android Suggested Edits. Each is a subclass of the abstract  class, which in turn subclasses.


 * : Counts Wikidata description edits from the Wikipedia app per user. In technical terms, it counts revisions created through the wbsetdescription API module where the User-Agent begins with.
 * : Counts structured image caption edits from the Wikipedia app per user. In technical terms, it counts revisions created through the wbsetlabel API module where the User-Agent begins with.
 * : Counts Wikidata Depicts (P180) statements added from the Wikipedia app per user. In technical terms, it counts revisions where the User-Agent begins with   and the revision results from either a wbsetclaim request concerning P180 or a wbeditentity request adding a Depicts statement.