11name : Claude Code Review
22
33on :
4- pull_request_target :
4+ pull_request :
55 types : [opened, reopened]
66 issue_comment :
77 types : [created]
@@ -14,18 +14,18 @@ concurrency:
1414jobs :
1515 claude-review :
1616 if : |
17- github.event_name == 'pull_request_target ' ||
18- (github.event_name == 'issue_comment' &&
19- github.event.issue.pull_request &&
17+ github.event_name == 'pull_request ' ||
18+ (github.event_name == 'issue_comment' &&
19+ github.event.issue.pull_request &&
2020 contains(github.event.comment.body, '@claude'))
21-
21+
2222 runs-on : ubuntu-latest
2323 permissions :
2424 contents : read
2525 pull-requests : write
2626 issues : write
2727 id-token : write
28-
28+
2929 steps :
3030 - name : Checkout repository
3131 uses : actions/checkout@v4
@@ -39,10 +39,10 @@ jobs:
3939 with :
4040 anthropic_api_key : ${{ secrets.ANTHROPIC_API_KEY }}
4141 github_token : ${{ secrets.GITHUB_TOKEN }}
42-
42+
4343 # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
4444 # model: "claude-opus-4-20250514"
45-
45+
4646 # Direct prompt for automated review (no @claude mention needed)
4747 direct_prompt : |
4848 Please review this pull request and provide feedback on:
@@ -51,28 +51,27 @@ jobs:
5151 - Performance considerations
5252 - Security concerns
5353 - Test coverage
54-
54+
5555 Be constructive and helpful in your feedback.
56-
56+
5757 # Optional: Customize review based on file types
5858 # direct_prompt: |
5959 # Review this PR focusing on:
6060 # - For TypeScript files: Type safety and proper interface usage
6161 # - For API endpoints: Security, input validation, and error handling
6262 # - For React components: Performance, accessibility, and best practices
6363 # - For tests: Coverage, edge cases, and test quality
64-
64+
6565 # Optional: Different prompts for different authors
6666 # direct_prompt: |
67- # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
67+ # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
6868 # 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' ||
6969 # 'Please provide a thorough code review focusing on our coding standards and best practices.' }}
70-
70+
7171 # Optional: Add specific tools for running tests or linting
7272 # allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)"
73-
73+
7474 # Optional: Skip review for certain conditions
7575 # if: |
7676 # !contains(github.event.pull_request.title, '[skip-review]') &&
7777 # !contains(github.event.pull_request.title, '[WIP]')
78-
0 commit comments