Skip to content

ci: add per-PR XML structure check against doc-en#412

Open
lacatoire wants to merge 1 commit into
php:masterfrom
lacatoire:feat/check-xml-structure
Open

ci: add per-PR XML structure check against doc-en#412
lacatoire wants to merge 1 commit into
php:masterfrom
lacatoire:feat/check-xml-structure

Conversation

@lacatoire

Copy link
Copy Markdown
Member

Adds a GitHub Actions workflow that runs on every pull request and checks that the block structure of modified XML files stays aligned with the corresponding doc-en file.

How it works

  • Triggered on pull_request events targeting master
  • Collects the list of .xml files changed in the PR
  • For each file, reads the EN-Revision hash it declares and fetches doc-en at that exact revision
  • Compares the element skeleton of both files (tag names and structural attributes, not prose)
  • Emits ::error annotations in the PR if a divergence is found
  • A file that lags behind sync is compared against the EN version it actually translated, so it does not produce false positives

Prior art

This check is already in use in doc-fr, doc-ru, doc-es, and doc-it. There is also an ongoing initiative in doc-base to provide reusable workflows that all doc-* repos can share.

@lacatoire
lacatoire force-pushed the feat/check-xml-structure branch from 9e0b2fa to ed04e21 Compare July 20, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant