ci(pr-agent): stop bot comments from cancelling the PR review run (#700)
The PR Agent review almost never completed: the workflow triggers on both pull_request and issue_comment and shared one concurrency group (pr-agent-<number>) with cancel-in-progress. Vercel/Supabase/compliance preview bots comment within ~2s of a PR opening, so each issue_comment event queued a run in the same group and cancel-in-progress killed the in-flight review — before the job-level `if: sender.type != 'Bot'` could skip the bot run (concurrency cancellation precedes job evaluation). Add the event_name to the concurrency group so pull_request runs and issue_comment runs no longer collide. A new push (synchronize) still supersedes a stale review; bot comments now cancel only each other (all skipped) and never the open/push review. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
b38b3d0230
commit
07ecb98389
@@ -21,9 +21,16 @@ on:
|
||||
issue_comment:
|
||||
types: [created, edited]
|
||||
|
||||
# One run per PR; cancel a superseded run when a new push lands.
|
||||
# One run per PR *per event type*; a new push (pull_request:synchronize) cancels
|
||||
# a superseded review. The event_name suffix is critical: without it, the
|
||||
# pull_request and issue_comment triggers share a group, so a bot comment
|
||||
# (Vercel/Supabase/compliance preview bots fire within ~2s of opening a PR)
|
||||
# queues an issue_comment run that cancel-in-progress kills the real review with —
|
||||
# before the job-level `if: sender.type != 'Bot'` ever gets to skip it. Keeping the
|
||||
# groups separate lets comment runs cancel only each other (all skipped, harmless)
|
||||
# and never the open/push review.
|
||||
concurrency:
|
||||
group: pr-agent-${{ github.event.pull_request.number || github.event.issue.number }}
|
||||
group: pr-agent-${{ github.event.pull_request.number || github.event.issue.number }}-${{ github.event_name }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
|
||||
Reference in New Issue
Block a user