diff --git a/.github/workflows/pr-review.yml b/.github/workflows/pr-review.yml index aa0510701..6fa237dc2 100644 --- a/.github/workflows/pr-review.yml +++ b/.github/workflows/pr-review.yml @@ -67,16 +67,24 @@ permissions: concurrency: # Event-triggered and mention-triggered runs for a specific PR get a per-PR # concurrency slot so they never queue behind unrelated PRs. + # check_suite events carry the associated PR in pull_requests[0]; including + # that URL here prevents cross-PR cancellation when multiple PRs' CI suites + # complete simultaneously (each PR competes only with itself, which is safe + # since same-PR runs are idempotent on the same head SHA). + # Note: check_suite.pull_requests entries expose the API `url` field, not + # `html_url` — using `url` here matches the payload shape. # Manual batch runs (workflow_dispatch without pr_url) use a shared slot. group: >- ${{ (inputs.pr_url || github.event.client_payload.pr_url - || github.event.pull_request.html_url) + || github.event.pull_request.html_url + || github.event.check_suite.pull_requests[0].url) && format('pr-review-pr-{0}', inputs.pr_url || github.event.client_payload.pr_url - || github.event.pull_request.html_url) + || github.event.pull_request.html_url + || github.event.check_suite.pull_requests[0].url) || 'pr-review-batch' }} cancel-in-progress: false