Skip to content

Build/Test Tools: Add a workflow to generate a list of changed files when a new version is tagged - #12068

Open
AKSHAT2802 wants to merge 7 commits into
WordPress:trunkfrom
AKSHAT2802:add/generate-changed-files-action
Open

AKSHAT2802 wants to merge 7 commits into
WordPress:trunkfrom
AKSHAT2802:add/generate-changed-files-action

Conversation

@AKSHAT2802

@AKSHAT2802 AKSHAT2802 commented Jun 3, 2026 •

Copy link
Copy Markdown

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:

svn diff --summarize https://core.svn.wordpress.org/tags/6.1.1 \
  https://core.svn.wordpress.org/branches/6.2 | grep '^M'

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 using
git tag --sort=-version:refname, so pushing 6.6.2 compares
6.6.1 → 6.6.2 with 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 .0 tag.

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

  • Step Summary — a Markdown-formatted list visible directly on the Actions run page. No download or technical setup required.
  • Workflow Artifact — a downloadable changed-files-<tag>.txt file for use in tooling or copy-pasting into documentation.

Test plan

  • After merging to trunk, navigate to
    Actions → 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.
  • Push a new version tag and confirm the workflow trigger automatically resolves the correct previous tag and produces the expected output.

AKSHAT2802 and others added 3 commits June 3, 2026 15:15
…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.
@github-actions

github-actions Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

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:

Props akshat2802, lancewillett.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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 lancewillett 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.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants