Make WordPress Core

Changeset 65510


Ignore:
Timestamp:
11/13/2026 04:17:36 AM (less than one hour ago)
Author:
desrosj
Message:

Build/Test Tools: Use PR number for concurrency groups instead of 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 inadvertently 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.

Reviewed by lancewillett.
Merges r65249 to the 5.4 branch.

Props lancewillett.
See #65845.

Location:
branches/5.4
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/5.4

  • branches/5.4/.github/workflows/coding-standards.yml

    r65485 r65510  
    3232# Cancels all previous workflow runs for pull requests that have not completed.
    3333concurrency:
    34   # The concurrency group contains the workflow name and the branch name for pull requests
     34  # The concurrency group contains the workflow name and the pull request number for pull requests
    3535  # or the commit hash for any other events.
    36   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     36  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
    3737  cancel-in-progress: true
    3838
  • branches/5.4/.github/workflows/javascript-tests.yml

    r65485 r65510  
    3030# Cancels all previous workflow runs for pull requests that have not completed.
    3131concurrency:
    32   # The concurrency group contains the workflow name and the branch name for pull requests
     32  # The concurrency group contains the workflow name and the pull request number for pull requests
    3333  # or the commit hash for any other events.
    34   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     34  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
    3535  cancel-in-progress: true
    3636
  • branches/5.4/.github/workflows/phpunit-tests.yml

    r65485 r65510  
    1919# Cancels all previous workflow runs for pull requests that have not completed.
    2020concurrency:
    21   # The concurrency group contains the workflow name and the branch name for pull requests
     21  # The concurrency group contains the workflow name and the pull request number for pull requests
    2222  # or the commit hash for any other events.
    23   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     23  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
    2424  cancel-in-progress: true
    2525
  • branches/5.4/.github/workflows/test-build-processes.yml

    r65485 r65510  
    2626# Cancels all previous workflow runs for pull requests that have not completed.
    2727concurrency:
    28   # The concurrency group contains the workflow name and the branch name for pull requests
     28  # The concurrency group contains the workflow name and the pull request number for pull requests
    2929  # or the commit hash for any other events.
    30   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     30  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
    3131  cancel-in-progress: true
    3232
Note: See TracChangeset for help on using the changeset viewer.