Skip to content

Commit 66e8c27

Browse files
fix(ci): skip claude-mention for bot-authored issues (#1429)
## Summary - Add `github.event.issue.user.login != 'worktrunk-bot'` to the `issues` trigger in `claude-mention.yaml` - Document the new filter in `.github/CLAUDE.md` "Does not trigger" list ## Problem The hourly review workflow creates issues (like #1424) that incidentally mention `@worktrunk-bot` in body text — e.g., "comment contained `@worktrunk-bot`". This triggers `claude-mention` on the `issues` event, which then duplicates the hourly review's work, including creating a second fix PR (#1425 vs #1426 for the same issue). ## Fix Add an author check to skip issues created by `worktrunk-bot` itself, consistent with the existing `comment.user.login != 'worktrunk-bot'` loop-prevention checks on `issue_comment` and `pull_request_review_comment` events. Closes #1428 ## Test plan - [ ] Verify the `if:` condition syntax is valid (CI should pass) - [ ] Confirm the next hourly review run doesn't trigger a claude-mention run on its issues 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: worktrunk-bot <254187624+worktrunk-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d8078b1 commit 66e8c27

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ The mention workflow runs for any user who includes `@worktrunk-bot` — the mer
138138
- Editing a comment or issue body re-triggers the same response
139139

140140
**Does not trigger:**
141+
- Issues authored by `worktrunk-bot` (prevents self-triggering when bot-created issues incidentally mention `@worktrunk-bot` in body text)
141142
- `worktrunk-bot`'s own comments or reviews (loop prevention)
142143
- Empty approvals on `worktrunk-bot` PRs (approved with no body)
143144
- Comments on issues or PRs where `worktrunk-bot` hasn't engaged and no `@worktrunk-bot` mention

.github/workflows/claude-mention.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ jobs:
3737
# for the same reason.)
3838
if: |
3939
(github.event_name == 'issues' &&
40-
contains(github.event.issue.body, '@worktrunk-bot')) ||
40+
contains(github.event.issue.body, '@worktrunk-bot') &&
41+
github.event.issue.user.login != 'worktrunk-bot') ||
4142
(github.event_name == 'issue_comment' &&
4243
github.event.comment.user.login != 'worktrunk-bot') ||
4344
(github.event_name == 'pull_request_review_comment' &&

0 commit comments

Comments
 (0)