From a6f435ad227ec298fc849f07a2ebe156ad55d7a2 Mon Sep 17 00:00:00 2001 From: Johnathan Falk Date: Mon, 5 Oct 2026 01:02:22 -0400 Subject: [PATCH] fix(ci): key PR Automation concurrency on the event action too An edited/labeled event on the same head commit cancelled the in-flight synchronize run, leaving its jobs red as cancelled on that commit. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017MtQ5LP2n3t3bs7AhptkKJ --- .github/workflows/pr-automation.yml | 8 ++++++-- .../20261005_pr_automation_concurrency_per_action.md | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 changelog.d/20261005_pr_automation_concurrency_per_action.md diff --git a/.github/workflows/pr-automation.yml b/.github/workflows/pr-automation.yml index 17551b0b..fd9e38e2 100644 --- a/.github/workflows/pr-automation.yml +++ b/.github/workflows/pr-automation.yml @@ -1,5 +1,5 @@ # file: .github/workflows/pr-automation.yml -# version: 4.5.8 +# version: 4.5.9 # guid: a7b8c9d0-e1f2-3456-a789-0123456789bc # NOTE: This file should be updated in ghcommon repository first, then copied to other repositories. # To update: Edit in https://github.com/falkcorp/github-common/.github/workflows/pr-automation.yml then copy to other repos @@ -19,8 +19,12 @@ on: # The group includes event_name: one push fires both a pull_request and a # pull_request_target run, and with a shared group whichever arrives second # cancelled the other, leaving its jobs as red "cancelled" checks on every PR. +# It also includes the action: an `edited` or `labeled` event on the same head +# commit otherwise cancelled the in-flight `synchronize`/`opened` run, and those +# cancelled jobs stay red on that commit. A new push (`synchronize` after +# `synchronize`) still supersedes the older run, which is what we want. concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.action }}-${{ github.event.pull_request.number }} cancel-in-progress: true permissions: diff --git a/changelog.d/20261005_pr_automation_concurrency_per_action.md b/changelog.d/20261005_pr_automation_concurrency_per_action.md new file mode 100644 index 00000000..2df10374 --- /dev/null +++ b/changelog.d/20261005_pr_automation_concurrency_per_action.md @@ -0,0 +1,5 @@ +### Fixed + +#### pr-automation: an edit or label no longer cancels the run for the same commit + +- The concurrency group now also includes `github.event.action`. Editing a PR body seconds after a push cancelled the push's `synchronize` run (seen on #365: Code Quality Check, Auto Label PR and AI Rebase stayed red as "cancelled" on the head commit even though the later run passed them). A new push still supersedes the previous push's run.