HomePhabricator

Fix revert counting for non-language-specific counters

Description

Fix revert counting for non-language-specific counters

The change in d0fd394 did not update revert counting according to the
new treatment for non-language-specific counters; hence, reverts for
those counters (including the new Depicts counter) will not be counted
correctly without this change.

We also need to check that the action in the edit summary matches the
specified action for the counter, or else reverts will be counted once by
each language-agnostic counter.

This patch also adds some new unit tests around edit and revert counting
to increase confidence in the counters and help prevent regressions.
Change tag addition and checking is moved out of conditionallyIncrement
methods to facilitate testing those methods. Also removed is the check
that MW_API is defined; it is redundant with the 'action' parameter
check and complicates testing.

Bug: T244974
Change-Id: Ibd80bfe839b732e577abea5c7f55dbda5da49f42

Details

Provenance
MhollowayAuthored on Mar 10 2020, 8:31 PM
Parents
rEWET41a785501f1a: Adds Image Tag edit and revert counts
Branches
Unknown
Tags
Unknown
ChangeId
Ibd80bfe839b732e577abea5c7f55dbda5da49f42