Skip to content

Commit e0d7857

Browse files
ci: skip claude.yml when comment is '@claude review'
Comments starting with '@claude review' are handled by the hosted code-review webhook, which creates a dedicated check run. Running this workflow on the same trigger causes both systems to respond to one comment — the GHA run then fails on fork PRs because it tries to fetch the fork branch from origin.
1 parent 92c693b commit e0d7857

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/claude.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ on:
1313

1414
jobs:
1515
claude:
16+
# '@claude review' at the start of an issue_comment is handled by the hosted
17+
# code-review webhook; skip here so both systems don't fire on the same comment.
1618
if: |
17-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
19+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude') && !startsWith(github.event.comment.body, '@claude review')) ||
1820
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
1921
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
2022
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))

0 commit comments

Comments
 (0)