Repository navigation
fix(ci): stop pull_request and pull_request_target PR Automation runs cancelling each other - #366
Merged
Merged
Conversation
… 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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017MtQ5LP2n3t3bs7AhptkKJ
This was referenced Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
pr-automation.ymltriggers on bothpull_requestandpull_request_target, and both runs land in one concurrency group (PR Automation-<number>,cancel-in-progress: true). Every PR event starts both runs at the same instant; whichever is queued second cancels the other. The cancelled run's jobs show as red checks.Evidence:
pull_request): Code Quality Check, Auto Label PR, Intelligent AI Labeling, PR Analysis, Breaking Changes Check, AI Rebase & Conflict Resolution all CANCELLED at 0s with annotationCanceling since a higher priority waiting request for PR Automation-365 exists. Run 37265215038 (pull_request_target) for the same push ran.pull_request_targetside lost the race instead; Code Quality Check and Intelligent AI Labeling show CANCELLED.So this breaks every PR in the repo, independent of what the PR changes.
Fix
Add
github.event_nameto the group. Same-event supersession (a newersynchronizereplacing an older one) still cancels, which is intended; the two triggers no longer cancel each other.cancel-in-progress: falsewould not fix it, since a newer pending run still replaces an older pending one.This PR proves itself: its
pull_requestrun uses the new group from the merge ref, itspull_request_targetrun uses main's old group, so they no longer collide.Noted, not fixed here
The
pull_request_targetrun's Code Quality Check does a plainactions/checkoutwith noref, so on that event it checks out the base branch and lints main, not the PR. Its "pass" says nothing about the PR. Out of scope for this fix.🤖 Generated with Claude Code
https://claude.ai/code/session_017MtQ5LP2n3t3bs7AhptkKJ