Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

fix: move concurrency to job level in claude-mention to prevent race (#1305)

worktrunk-bot4ed7cdecab66
diff --git a/.github/workflows/claude-mention.yaml b/.github/workflows/claude-mention.yaml
index 04cd58a4d..0d0219d67 100644
--- a/.github/workflows/claude-mention.yaml
+++ b/.github/workflows/claude-mention.yaml
@@ -9,10 +9,6 @@ on:
pull_request_review_comment:
types: [created, edited]
-concurrency:
- group: ${{ github.workflow }}-${{ github.event.issue.number || github.event.pull_request.number }}
- cancel-in-progress: true
-
# Consistent with ci.yaml for cache compatibility
env:
CARGO_TERM_COLOR: always
@@ -45,6 +41,13 @@ jobs:
(github.event_name == 'pull_request_review_comment' &&
github.event.pull_request.head.repo.full_name == github.repository &&
github.event.comment.user.login != 'worktrunk-bot')
+ # Job-level concurrency (not workflow-level) so that runs skipped by the
+ # `if:` above don't enter the concurrency group. Workflow-level concurrency
+ # is evaluated before job-level `if:`, so bot comments that will be filtered
+ # out still cancel in-progress runs. See #1292.
+ concurrency:
+ group: ${{ github.workflow }}-${{ github.event.issue.number || github.event.pull_request.number }}
+ cancel-in-progress: true
runs-on: ubuntu-24.04
permissions:
contents: write # Allow pushing commits