Skip to content

7.0 Branch: Build/Test Tools: Use PR number for concurrency groups instead of head_ref. - #15569

Open
desrosj wants to merge 1 commit into
WordPress:7.0from
desrosj:backport/65249-7.0
Open

desrosj wants to merge 1 commit into
WordPress:7.0from
desrosj:backport/65249-7.0

Conversation

@desrosj

@desrosj desrosj commented Nov 5, 2026

Copy link
Copy Markdown
Member

Backports r65249 to the 7.0 branch.

Switches GitHub Actions concurrency groups from github.head_ref (branch name only) to github.event.pull_request.number, so workflow runs from PRs opened from different forks with identical branch names no longer cancel each other. props-bot.yml uses github.event.pull_request.number || github.event.issue.number to also cover issue_comment events.

All files in this branch that use head_ref in a concurrency group were updated. Some of them (such as check-built-files.yml) do not exist in trunk.

Trac ticket: https://core.trac.wordpress.org/ticket/65845

Use of AI Tools

Claude Code (Claude Opus 5.5) applied the trunk change to each branch with scripted substitutions and opened this PR. Each diff was checked to contain only the expected concurrency group and comment changes.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

⚠️ PHPStan Static Analysis

PHPStan reported 2 errors when analyzing 60c451e (workflow run). This comment is updated as new commits are pushed.

Errors

These are also shown as annotations on the changed files. They do not fail the check, but they should still be fixed before the pull request is committed. An error that is a false positive may instead warrant being added to a baseline.

Location Error Identifier First reported
src/wp-admin/load-scripts.php:68 Function get_file not found. function.notFound 0676226
src/wp-admin/load-styles.php:83 Function get_file not found. function.notFound 0676226

Running PHPStan locally

To run the analysis on your own machine, use npm run typecheck:php, or composer phpstan outside the Docker environment.

@desrosj desrosj changed the title [7.0] Build/Test Tools: Use PR number for concurrency groups instead of head_ref. 7.0 Branch: Build/Test Tools: Use PR number for concurrency groups instead of head_ref. Nov 5, 2026
@desrosj
desrosj requested a review from a team November 6, 2026 00:49
@desrosj desrosj self-assigned this Nov 6, 2026
@desrosj

desrosj commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

I've opened up #15609 for the PHPStan errors.

@desrosj
desrosj marked this pull request as ready for review November 6, 2026 01:09
@github-actions

github-actions Bot commented Nov 6, 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 desrosj.

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.

…head_ref`.

The current standard across all GitHub Actions workflows is to configure `concurrency` to use the `github.head_ref` value in the `group` name for a given PR. Because `head_ref` only includes the branch name, workflow runs can be inadvertantly cancelled when two PRs are open from different forks with identical branch names.

This switches to using the `github.event.pull_request.number` instead of `github.head_ref` to ensure that runs are properly grouped only with runs from the same pull request. A similar change has been made to `props-bot.yml`, which can be triggered by an `issue_comment` event. In this case, the `github.event.issue.number` will be used. In the context of GitHub, `issues == pull_requests` for the data returned by a number of request types.

Merges [65249] to the 7.0 branch.

Props lancewillett.
See #65845.
@desrosj
desrosj force-pushed the backport/65249-7.0 branch from 0676226 to 60c451e Compare November 6, 2026 02:42
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@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.

Checked against the 7.0 branch at 60c451e: all 14 workflows whose concurrency group used github.head_ref now use github.event.pull_request.number, matching r65249, with the comment line updated to match. props-bot.yml uses the github.event.pull_request.number || github.event.issue.number form, same as trunk. No head_ref is left under .github/ and nothing else changed. CI: 195 passed, 28 skipped, 0 failed.

AI review · claude-opus-5-5

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

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants