|
1 | | -name: Claude Code |
| 1 | +name: Claude Code Review |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | issue_comment: |
5 | 5 | types: [created] |
6 | 6 | pull_request_review_comment: |
7 | 7 | types: [created] |
8 | | - issues: |
9 | | - types: [opened, assigned] |
10 | | - pull_request_review: |
11 | | - types: [submitted] |
12 | 8 | pull_request: |
13 | 9 | types: [opened, synchronize] |
14 | 10 |
|
15 | 11 | jobs: |
16 | 12 | claude: |
| 13 | + # Auto-review on PR open/sync, or respond to @claude mentions |
17 | 14 | if: | |
18 | 15 | (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || |
19 | 16 | (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || |
20 | | - (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || |
21 | | - (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) || |
22 | 17 | (github.event_name == 'pull_request') |
23 | 18 | runs-on: ubuntu-latest |
24 | 19 | permissions: |
25 | | - contents: read |
| 20 | + contents: write |
26 | 21 | pull-requests: write |
27 | 22 | issues: write |
28 | 23 | id-token: write |
29 | | - actions: read |
30 | 24 | steps: |
31 | 25 | - name: Checkout repository |
32 | | - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 |
33 | | - with: |
34 | | - fetch-depth: 1 |
| 26 | + uses: actions/checkout@v4 |
35 | 27 |
|
36 | | - - name: Run Claude Code |
37 | | - id: claude |
38 | | - uses: anthropics/claude-code-action@ac1a3207f3f00b4a37e2f3a6f0935733c7c64651 # v1.0 |
| 28 | + - name: Run Claude Code Review |
| 29 | + uses: anthropics/claude-code-action@v1 |
39 | 30 | with: |
40 | 31 | anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} |
41 | | - |
42 | | - # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it. |
43 | 32 | prompt: | |
44 | 33 | Review this PR following the guidelines in CLAUDE.md. |
45 | | - Focus on code quality, security, and adherence to project standards. |
46 | | - Be concise and actionable in your feedback - highlight critical issues first. |
47 | | -
|
48 | | - # Optional: Add claude_args to customize behavior and configuration |
49 | | - # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md |
50 | | - # or https://docs.claude.com/en/docs/claude-code/cli-reference for available options |
51 | | - # claude_args: '--allowed-tools Bash(gh pr:*)' |
| 34 | + Focus on: |
| 35 | + - Code quality and maintainability |
| 36 | + - Security issues |
| 37 | + - TypeScript strict mode compliance (NO `any` types) |
| 38 | + - Next.js App Router best practices |
| 39 | + - Server vs Client Component usage |
| 40 | + - hey-api integration patterns |
| 41 | + Be concise and actionable - highlight critical issues first. |
| 42 | + claude_args: "--max-turns 5" |
0 commit comments