Skip to content

Add per-PR XML structure check against doc-en#1051

Merged
sy-records merged 2 commits into
php:masterfrom
lacatoire:feat/check-xml-structure
Jul 21, 2026
Merged

Add per-PR XML structure check against doc-en#1051
sy-records merged 2 commits 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.

Comment thread .github/workflows/check-xml.yml Outdated
@sy-records sy-records changed the title ci: add per-PR XML structure check against doc-en Add per-PR XML structure check against doc-en Jul 21, 2026
@sy-records
sy-records merged commit 6356170 into php:master Jul 21, 2026
2 checks passed
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.

2 participants