Skip to content

Add per-PR EN-Revision hash check#1052

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

Add per-PR EN-Revision hash check#1052
sy-records merged 2 commits into
php:masterfrom
lacatoire:feat/check-en-revision

Conversation

@lacatoire

Copy link
Copy Markdown
Member

Adds a GitHub Actions workflow that runs on every pull request and verifies that the EN-Revision header in modified XML files points to the latest doc-en commit for that file.

How it works

  • Triggered on pull_request events targeting master
  • Collects the list of .xml files changed in the PR
  • For each file that also exists in doc-en, reads the declared EN-Revision hash
  • Compares it against git log -1 on the matching doc-en file
  • Emits a ::error annotation and fails if the hash is missing or outdated

This ensures that translation updates always reference the exact upstream commit they are based on, making future sync work easier to track.

Prior art

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

Comment thread .github/workflows/check-en-revision.yml Outdated
@sy-records sy-records changed the title ci: add per-PR EN-Revision hash check Add per-PR EN-Revision hash check Jul 21, 2026
@sy-records
sy-records merged commit d4272ab 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