Repository navigation
ci(repo): key the PR title workflow's concurrency group to the PR - #2962
Conversation
Under `pull_request_target`, `github.ref` is the *base* branch, not the PR. Every PR targeting master therefore shared the concurrency group `PR is Conventional and Semantic-refs/heads/master`, and since the workflow sets `cancel-in-progress: true`, opening or pushing to any one PR cancelled the in-flight run of whichever unrelated PR happened to be running. A cancelled run reports as a failed check, so this surfaced as a red `semantic_changelog_update` on a PR that had nothing wrong with it, and cleared on a manual re-run — making it look like flake rather than a concurrency misconfiguration. Key the group off the PR number instead, matching what check_db_entities.yml already does (and reusing its comment). `github.ref` stays as the fallback for any event without a pull_request payload. The repo's other workflows are unaffected: they trigger on `pull_request` (where `github.ref` is the per-PR `refs/pull/N/merge`) or on push, schedule, and release events, where keying off `github.ref` is correct. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe pull request title workflow now scopes concurrency by workflow and pull request number when available. It falls back to ChangesPull Request Title Workflow
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~2 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The workflow now isolates pull-request runs as intended, with a fallback for non-pull-request events; no merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Linear:
CLA
Description of the pull request
pr_title.ymltriggers onpull_request_target, wheregithub.refis the base branch rather than the PR. Combined withcancel-in-progress: true, that meant every PR targetingmastershared a single concurrency group:So opening or pushing to any PR cancelled the in-flight run of whichever unrelated PR happened to be running at that moment. A cancelled run reports as a failed check, so this shows up as a red
semantic_changelog_updateon a PR that has nothing wrong with it, and goes green on a manual re-run — which makes it look like flake rather than a misconfiguration.Observed instance
While pushing a merge commit to #2871, its run was cancelled 1 second in by an unrelated PR:
worktree-unread-bannersmasterv11masterBoth have
base: master, so both resolved to the same group. The cancelled job had"steps": []— killed before it ran anything. Re-running it passed with no code change.Fix
Key the group off the PR number, which is what
check_db_entities.ymlalready does — this reuses that workflow’s comment verbatim so the two read the same.github.refis kept as the fallback for any event without apull_requestpayload.Scope
I checked every workflow in the repo; this is the only one affected.
check_db_entities.ymlis the otherpull_request_targetworkflow and is already fixed. The rest trigger onpull_request(wheregithub.refis the per-PRrefs/pull/N/merge) or on push / schedule / release events, where keying offgithub.refis correct.Full audit
pr_title.ymlpull_request_targetgithub.refcheck_db_entities.ymlpull_request_targete2e_test.ymlpull_requestgithub.reflegacy_version_analyze.ymlpull_request,pushgithub.refpana.ymlpull_request,pushgithub.refstream_flutter_workflow.ymlpull_request,pushgithub.refdistribute_external.ymlrelease,workflow_dispatchgithub.refdistribute_internal.ymlpush,workflow_dispatchgithub.refe2e_test_cron.ymlschedule,workflow_dispatchgithub.refrelease_publish.ymlpush,workflow_dispatchgithub.refrelease_tag.ymlpushgithub.refNo package behavior changes, so no CHANGELOG entry (matching #2953 and other
ci(repo):PRs).Screenshots / Videos
n/a — CI configuration only.
Note that this PR is not its own smoke test:
pull_request_targetalways runs the workflow definition from the base branch, so this PR's ownconventional_pr_title/semantic_changelog_updatechecks still execute under the old, shared group. The fix only takes effect for PRs opened or updated after it lands onmaster.🤖 Generated with Claude Code
Summary by CodeRabbit