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.