Page MenuHomePhabricator

Use REST API to check if any lint errors were actually fixed before saving edit
Closed, ResolvedPublic

Description

Sometimes unnecessary but harmless edits are made as a result of the markup normalization done by the delinter. This could be avoided by checking what errors a page had before performing lint replacements versus what errors it has after that.
Docs: https://www.mediawiki.org/wiki/API:REST_API/Reference#Convert_Wikitext_to_lint_errors

  • Add a function for making POST requests to the REST API
  • Add a function for getting the number of lint errors from the REST API
  • Remove code that was working as a stop-gap measure to prevent edits being saved when no errors were fixed for lint category #22

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Fix REST API pathtoolforge-repos/delintbot!21r4356thfix-rest-pathmain
Use REST API to verify whether any lint errors were actually fixed before saving edittoolforge-repos/delintbot!20r4356threst-apimain
Customize query in GitLab

Event Timeline

Redmin triaged this task as High priority.Mar 27 2026, 10:44 AM

r4356th opened https://gitlab.wikimedia.org/toolforge-repos/delintbot/-/merge_requests/20

Use REST API to verify whether any lint errors were actually fixed before saving edit

r4356th merged https://gitlab.wikimedia.org/toolforge-repos/delintbot/-/merge_requests/20

Use REST API to verify whether any lint errors were actually fixed before saving edit

Redmin claimed this task.