Skip to content

Commit a8ea27a

Browse files
committed
chore: configure Claude Code Review for automatic PR reviews
- Add automatic PR review on open/synchronize - Configure Claude to follow CLAUDE.md guidelines - Focus on code quality, security, and TypeScript strict mode - Limit to 5 turns for faster reviews - Support @claude mentions in comments
1 parent 2b72584 commit a8ea27a

File tree

1 file changed

+27
-9
lines changed

1 file changed

+27
-9
lines changed

.github/workflows/claude.yml

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@ on:
99
types: [opened, synchronize]
1010

1111
jobs:
12-
claude:
13-
# Auto-review on PR open/sync, or respond to @claude mentions
14-
if: |
15-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
16-
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
17-
(github.event_name == 'pull_request')
12+
# Auto-review on PR open/sync
13+
auto-review:
14+
if: github.event_name == 'pull_request'
1815
runs-on: ubuntu-latest
1916
permissions:
2017
contents: write
@@ -23,10 +20,10 @@ jobs:
2320
id-token: write
2421
steps:
2522
- name: Checkout repository
26-
uses: actions/checkout@v4
23+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
2724

28-
- name: Run Claude Code Review
29-
uses: anthropics/claude-code-action@v1
25+
- name: Run Claude Auto Review
26+
uses: anthropics/claude-code-action@ac1a3207f3f00b4a37e2f3a6f0935733c7c64651 # v1.0
3027
with:
3128
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
3229
prompt: |
@@ -40,3 +37,24 @@ jobs:
4037
- hey-api integration patterns
4138
Be concise and actionable - highlight critical issues first.
4239
claude_args: "--max-turns 5"
40+
41+
# Respond to @claude mentions
42+
interactive:
43+
if: |
44+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
45+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude'))
46+
runs-on: ubuntu-latest
47+
permissions:
48+
contents: write
49+
pull-requests: write
50+
issues: write
51+
id-token: write
52+
steps:
53+
- name: Checkout repository
54+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
55+
56+
- name: Run Claude Interactive
57+
uses: anthropics/claude-code-action@v1
58+
with:
59+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
60+
claude_args: "--max-turns 5"

0 commit comments

Comments
 (0)