From 0b1cf9f60b402f7c48ed5da729306bd435f06a6f Mon Sep 17 00:00:00 2001 From: Ben Du Date: Mon, 28 Sep 2026 08:29:09 -0700 Subject: [PATCH] ci(merge-pr): move concurrency to job level to avoid cancelling pending runs when skipped --- .github/workflows/merge-pr.yaml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/merge-pr.yaml b/.github/workflows/merge-pr.yaml index 698810d..32f47bf 100644 --- a/.github/workflows/merge-pr.yaml +++ b/.github/workflows/merge-pr.yaml @@ -43,13 +43,6 @@ on: permissions: contents: write pull-requests: write -concurrency: - # Every run rescans all open PRs, so overlapping runs are pure duplicate work - # and the newest run always sees the freshest state. Do not cancel in - # progress: a run cancelled midway through the merge API call is worse than a - # redundant one. - group: merge-pull-request - cancel-in-progress: false jobs: merge_pull_request: # A triggering workflow that failed, was cancelled or was skipped left the @@ -59,6 +52,15 @@ jobs: if: | github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' + concurrency: + # Every run rescans all open PRs, so overlapping runs are pure duplicate + # work and the newest run always sees the freshest state. Do not cancel + # in progress: a run cancelled midway through the merge API call is worse + # than a redundant one. This is set on the job rather than the workflow + # so that a run whose `if` skips the job never joins the group, where it + # would replace (cancel) another PR's pending merge run. + group: merge-pull-request + cancel-in-progress: false uses: legendu-net/.github/.github/workflows/merge-pr.yaml@main with: dry_run: ${{ inputs.dry_run || false }}