Make WordPress Core

Changeset 65494


Ignore:
Timestamp:
11/13/2026 04:06:14 AM (3 weeks 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 7.0 branch.

Props lancewillett.
See #65845.

Location:
branches/7.0
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • branches/7.0

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

    r65469 r65494  
    3535# Cancels all previous workflow runs for pull requests that have not completed.
    3636concurrency:
    37   # The concurrency group contains the workflow name and the branch name for pull requests
     37  # The concurrency group contains the workflow name and the pull request number for pull requests
    3838  # or the commit hash for any other events.
    39   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     39  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
    4040  cancel-in-progress: true
    4141
  • branches/7.0/.github/workflows/end-to-end-tests.yml

    r65469 r65494  
    3838# Cancels all previous workflow runs for pull requests that have not completed.
    3939concurrency:
    40   # The concurrency group contains the workflow name and the branch name for pull requests
     40  # The concurrency group contains the workflow name and the pull request number for pull requests
    4141  # or the commit hash for any other events.
    42   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     42  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
    4343  cancel-in-progress: true
    4444
  • branches/7.0/.github/workflows/javascript-tests.yml

    r65469 r65494  
    3838# Cancels all previous workflow runs for pull requests that have not completed.
    3939concurrency:
    40   # The concurrency group contains the workflow name and the branch name for pull requests
     40  # The concurrency group contains the workflow name and the pull request number for pull requests
    4141  # or the commit hash for any other events.
    42   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     42  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
    4343  cancel-in-progress: true
    4444
  • branches/7.0/.github/workflows/javascript-type-checking.yml

    r65469 r65494  
    3131# Cancels all previous workflow runs for pull requests that have not completed.
    3232concurrency:
    33   # The concurrency group contains the workflow name and the branch name for pull requests
     33  # The concurrency group contains the workflow name and the pull request number for pull requests
    3434  # or the commit hash for any other events.
    35   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     35  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
    3636  cancel-in-progress: true
    3737
  • branches/7.0/.github/workflows/local-docker-environment.yml

    r65469 r65494  
    6161# Cancels all previous workflow runs for pull requests that have not completed.
    6262concurrency:
    63   # The concurrency group contains the workflow name and the branch name for pull requests
     63  # The concurrency group contains the workflow name and the pull request number for pull requests
    6464  # or the commit hash for any other events.
    65   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     65  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
    6666  cancel-in-progress: true
    6767
  • branches/7.0/.github/workflows/performance.yml

    r65469 r65494  
    3939# Cancels all previous workflow runs for pull requests that have not completed.
    4040concurrency:
    41   # The concurrency group contains the workflow name and the branch name for pull requests
     41  # The concurrency group contains the workflow name and the pull request number for pull requests
    4242  # or the commit hash for any other events.
    43   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     43  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
    4444  cancel-in-progress: true
    4545
  • branches/7.0/.github/workflows/php-compatibility.yml

    r65469 r65494  
    2727# Cancels all previous workflow runs for pull requests that have not completed.
    2828concurrency:
    29   # The concurrency group contains the workflow name and the branch name for pull requests
     29  # The concurrency group contains the workflow name and the pull request number for pull requests
    3030  # or the commit hash for any other events.
    31   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     31  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
    3232  cancel-in-progress: true
    3333
  • branches/7.0/.github/workflows/phpstan-static-analysis.yml

    r65469 r65494  
    2727# Cancels all previous workflow runs for pull requests that have not completed.
    2828concurrency:
    29   # The concurrency group contains the workflow name and the branch name for pull requests
     29  # The concurrency group contains the workflow name and the pull request number for pull requests
    3030  # or the commit hash for any other events.
    31   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     31  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
    3232  cancel-in-progress: true
    3333
  • branches/7.0/.github/workflows/phpunit-tests.yml

    r65469 r65494  
    6161# Cancels all previous workflow runs for pull requests that have not completed.
    6262concurrency:
    63   # The concurrency group contains the workflow name and the branch name for pull requests
     63  # The concurrency group contains the workflow name and the pull request number for pull requests
    6464  # or the commit hash for any other events.
    65   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     65  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
    6666  cancel-in-progress: true
    6767
  • branches/7.0/.github/workflows/props-bot.yml

    r65469 r65494  
    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 }}-${{ contains( fromJSON( '["pull_request_target", "pull_request_review", "pull_request_review_comment"]' ), github.event_name ) && github.head_ref || github.sha }}
     36  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.issue.number || github.sha }}
    3737  cancel-in-progress: true
    3838
  • branches/7.0/.github/workflows/pull-request-comments.yml

    r65469 r65494  
    1212# Cancels all previous workflow runs for pull requests that have not completed.
    1313concurrency:
    14   # The concurrency group contains the workflow name and the branch name for pull requests
     14  # The concurrency group contains the workflow name and the pull request number for pull requests
    1515  # or the commit hash for any other events.
    16   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.event_name == 'workflow_dispatch' && github.event.number || github.sha }}
     16  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.event.pull_request.number || github.event_name == 'workflow_dispatch' && github.event.number || github.sha }}
    1717
    1818# Disable permissions for all available scopes by default.
  • branches/7.0/.github/workflows/test-build-processes.yml

    r65469 r65494  
    3636# Cancels all previous workflow runs for pull requests that have not completed.
    3737concurrency:
    38   # The concurrency group contains the workflow name and the branch name for pull requests
     38  # The concurrency group contains the workflow name and the pull request number for pull requests
    3939  # or the commit hash for any other events.
    40   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     40  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
    4141  cancel-in-progress: true
    4242
  • branches/7.0/.github/workflows/upgrade-develop-testing.yml

    r65469 r65494  
    3131# Cancels all previous workflow runs for pull requests that have not completed.
    3232concurrency:
    33   # The concurrency group contains the workflow name and the branch name for pull requests
     33  # The concurrency group contains the workflow name and the pull request number for pull requests
    3434  # or the commit hash for any other events.
    35   group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
     35  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
    3636  cancel-in-progress: true
    3737
  • branches/7.0/.github/workflows/workflow-lint.yml

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