Skip to content

Commit d72abf0

Browse files
Modified Claude Code Review Action
1 parent 09f97a8 commit d72abf0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,18 @@ on:
99
# - "src/**/*.tsx"
1010
# - "src/**/*.js"
1111
# - "src/**/*.jsx"
12+
issue_comment:
13+
types: [created]
14+
pull_request_review_comment:
15+
types: [created]
1216

1317
jobs:
1418
claude-review:
19+
# Run on PR events or when @review-claude is mentioned in comments
20+
if: |
21+
github.event_name == 'pull_request' ||
22+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@review-claude')) ||
23+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@review-claude'))
1524
# Optional: Filter by PR author
1625
# if: |
1726
# github.event.pull_request.user.login == 'external-contributor' ||
@@ -49,6 +58,13 @@ jobs:
4958
5059
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
5160
61+
IMPORTANT: Format your review comments in the following structure:
62+
Line: [line_number], File: [file_path], Comment: [your_comment]
63+
64+
For example:
65+
Line: 42, File: src/utils/helper.py, Comment: Consider using a more descriptive variable name instead of 'x'
66+
Line: 15, File: tests/test_api.py, Comment: This test case should also verify the error message content
67+
5268
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
5369
5470
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md

0 commit comments

Comments
 (0)