Skip to content

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

Merged
leonardolara merged 2 commits into
php:masterfrom
lacatoire:feat/check-xml-structure
Jul 24, 2026
Merged

ci: add per-PR XML structure check against doc-en#787
leonardolara 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/scripts/check-structure.php Outdated

@alfsb alfsb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leonardolara Como você está tocando a tradução, deixo para ti decidir isso.

Comment thread .github/scripts/check-structure.php
Comment thread .github/scripts/check-structure.php
@leonardolara

Copy link
Copy Markdown
Contributor

Nosso processo já faz esta verificação com os scripts em doc-base localmente. Acho útil ter esta "redundância", principalmente para manter a qualidade mesmo com a entrada de novos tradutores inexperientes. Vamos adotar e verificar. Se ocorrerem muitos falsos-positivos, reavaliamos.

@leonardolara
leonardolara merged commit 2eb7527 into php:master Jul 24, 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.

3 participants