From d7579eab01082b20bc8d2f62741f9009b2902e45 Mon Sep 17 00:00:00 2001 From: Johnathan Falk Date: Mon, 5 Oct 2026 00:54:44 -0400 Subject: [PATCH] fix(ci): stop pull_request and pull_request_target PR Automation runs cancelling each other Both triggers fire on every PR event into one concurrency group, so the second run cancelled the first and its jobs showed as red cancelled checks on every PR. Key the group on event_name too. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017MtQ5LP2n3t3bs7AhptkKJ --- .github/workflows/pr-automation.yml | 7 +++++-- .../20261005_pr_automation_per_event_concurrency.md | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 changelog.d/20261005_pr_automation_per_event_concurrency.md diff --git a/.github/workflows/pr-automation.yml b/.github/workflows/pr-automation.yml index 9b19e82a..17551b0b 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.7 +# version: 4.5.8 # 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 @@ -16,8 +16,11 @@ on: pull_request_target: types: [opened, edited, synchronize, reopened] +# 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. concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number }} cancel-in-progress: true permissions: diff --git a/changelog.d/20261005_pr_automation_per_event_concurrency.md b/changelog.d/20261005_pr_automation_per_event_concurrency.md new file mode 100644 index 00000000..a3a0c01e --- /dev/null +++ b/changelog.d/20261005_pr_automation_per_event_concurrency.md @@ -0,0 +1,5 @@ +### Fixed + +#### pr-automation: pull_request and pull_request_target runs no longer cancel each other + +- The concurrency group now includes `github.event_name`. Every PR event fired both a `pull_request` and a `pull_request_target` run into the same group, so the second one cancelled the first and left its jobs (Code Quality Check, Auto Label PR, PR Analysis, Breaking Changes Check, AI Rebase, Intelligent AI Labeling) as red "cancelled" checks on every PR, including dependabot's #363 and #364.