Page MenuHomePhabricator

Add redirect test to PendingChangesBot
Closed, ResolvedPublic

Description

Add a test and logic to prevent automatic review of edits that change a page from an article to a redirect.

Logic:
If an edit changes a page from an article to a redirect, do not automatically review it.

Exception:
If the user is in the auto-reviewed user group and the edit is approved because of that user group membership, allow the auto-review.

Implementation Requirements:

  • Detect when an edit converts an article to a redirect
  • Handle localized translations of the #redirect keyword (magic words)
  • Check if the user is in the auto-reviewed user group before applying the block
  • Add comprehensive tests to autoreview.py

Example Edits:

Edit test Location:

Magic Words API:

Unit tests Should Cover:

  • Article-to-redirect conversion (should block)
  • Redirect-to-redirect edit (should not block based on this rule)
  • Article-to-redirect by auto-reviewed user (should allow)
  • Localized redirect keywords (e.g., Finnish #OHJAUS, #UUDELLEENOHJAUS)
  • Case insensitive redirect keywords (e,g: #REDIRECT #Redirect #redirect #ReDiRecT)

Event Timeline

Zache updated the task description. (Show Details)

@adiba_anjum I'd like to take this issue up! Kindly assign it to me.

@Zache can you please assign this issue to me. I'm party done on it, PR should be up very soon. I've also commented on the github issue here - https://github.com/Wikimedia-Suomi/PendingChangesBot-ng/issues/9#issuecomment-3380118602

FYI, @shreya-bhagat I assingned this to @harshita_2208 as harshita had commented on github first and had pullrequest. I will make new tasks.