Repository navigation
Build/Test Tools: Add a workflow to generate a list of changed files when a new version is tagged - #12068
Build/Test Tools: Add a workflow to generate a list of changed files when a new version is tagged#12068AKSHAT2802 wants to merge 7 commits into
Conversation
…version tags. Adds a GitHub Action that automatically generates a list of files changed between the newly tagged release and the previous release tag. This removes the need for contributors to manually run SVN or Git commands to produce the list used to update HelpHub documentation for each release. Fixes #64003.
…s generation workflow
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
There was a problem hiding this comment.
🟡 Changes recommended
The workflow can select a newer release as its baseline, compares development sources instead of shipped files, and masks failed comparisons as successful empty reports.
3 open issues
What changed in this PR
Adds a GitHub Actions workflow intended to simplify generating WordPress release file-change lists for documentation contributors.
Changes:
- Runs on version-tag pushes or manually with two tag inputs.
- Selects comparison tags and generates a sorted file list with change statuses.
- Publishes the list in the run summary and as a downloadable artifact.
| File | Description |
|---|---|
.github/workflows/generate-changed-files.yml |
Adds tag comparison, file-list generation, summary output, and artifact upload. |
Review effort: Balanced
| else | ||
| CURRENT_TAG="${GITHUB_REF_NAME}" | ||
| # Find the most recent version tag preceding the current one. | ||
| PREVIOUS_TAG=$( git tag --sort=-version:refname | grep -E '^[0-9]+\.[0-9]+(\.[0-9]+)?$' | grep -v "^${CURRENT_TAG}$" | head -1 ) |
| CURRENT_TAG: ${{ steps.tags.outputs.current_tag }} | ||
| PREVIOUS_TAG: ${{ steps.tags.outputs.previous_tag }} | ||
| run: | | ||
| git diff --name-status "${PREVIOUS_TAG}" "${CURRENT_TAG}" | sort > changed-files.txt |
| CURRENT_TAG: ${{ steps.tags.outputs.current_tag }} | ||
| PREVIOUS_TAG: ${{ steps.tags.outputs.previous_tag }} | ||
| run: | | ||
| git diff --name-status "${PREVIOUS_TAG}" "${CURRENT_TAG}" | sort > changed-files.txt |
lancewillett
left a comment
There was a problem hiding this comment.
The automatic selector takes the highest tag other than the current tag, not its predecessor. With 7.1.3 present, tagging 7.0.8 selects 7.1.3 rather than 7.0.7. Please select the appropriate preceding version and validate concurrent release-series cases before enabling the tag trigger.
AI review · gpt-6

Fixes: #640003
Generating a list of files changed between two WordPress releases currently requires technical knowledge — checking out a repository and running a manual SVN or Git command such as:
This PR adds
.github/workflows/generate-changed-files.yml, a GitHub Action that generates this list automatically, making it accessible to any contributor without requiring a local environment.How it works
Automatic — triggers on any version tag push (e.g.
6.6.2). The previous release tag is detected automatically usinggit tag --sort=-version:refname, so pushing6.6.2compares6.6.1 → 6.6.2with no manual input required. Major releases (e.g.7.0) correctly resolve to the last patch of the previous series(e.g.
6.9.4), not the.0tag.Manual (
workflow_dispatch) — contributors can trigger the workflow from the Actions tab at any time, providing two tag inputs to compare any two releases. Useful for back-filling documentation.Output
changed-files-<tag>.txtfile for use in tooling or copy-pasting into documentation.Test plan
trunk, navigate toActions → Generate Changed Files List → Run workflow, provide two existing tags (e.g.
compare_tag: 6.6.1,base_tag: 6.6.0), and confirm the step summary shows the correct list of changed files.