Skip to content

Commit 22d57f9

Browse files
committed
require explicit in comment to trigger review
1 parent 34165c0 commit 22d57f9

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

.github/workflows/claude-code-review.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
name: Claude Code Review
22

33
on:
4-
pull_request:
5-
types: [opened, synchronize]
6-
# Optional: Only run on specific file changes
7-
# paths:
8-
# - "src/**/*.ts"
9-
# - "src/**/*.tsx"
10-
# - "src/**/*.js"
11-
# - "src/**/*.jsx"
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
128

139
jobs:
1410
claude-review:
15-
# Optional: Filter by PR author
16-
# if: |
17-
# github.event.pull_request.user.login == 'external-contributor' ||
18-
# github.event.pull_request.user.login == 'new-developer' ||
19-
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20-
11+
if: |
12+
(
13+
github.event_name == 'issue_comment' &&
14+
github.event.issue.pull_request &&
15+
contains(github.event.comment.body, '@claude review') &&
16+
contains('OWNER,MEMBER,COLLABORATOR', github.event.comment.author_association)
17+
) || (
18+
github.event_name == 'pull_request_review_comment' &&
19+
contains(github.event.comment.body, '@claude review') &&
20+
contains('OWNER,MEMBER,COLLABORATOR', github.event.comment.author_association)
21+
)
2122
runs-on: ubuntu-latest
2223
permissions:
2324
contents: read

0 commit comments

Comments
 (0)