Skip to content

Commit 44150af

Browse files
committed
ci: add Claude PR auto review workflow
1 parent 888da85 commit 44150af

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Claude PR Auto Review
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
jobs:
8+
auto-review:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
pull-requests: read
13+
id-token: write
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 1
19+
20+
- uses: pnpm/action-setup@v4
21+
with:
22+
run_install: false
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version-file: ".nvmrc"
28+
cache: "pnpm"
29+
30+
- name: Install dependencies
31+
run: pnpm i --frozen-lockfile
32+
33+
- name: Automatic PR Review
34+
uses: anthropics/claude-code-action@v1
35+
with:
36+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
37+
prompt: |
38+
Please review this pull request and provide comprehensive feedback.
39+
40+
Focus on:
41+
- Code quality and best practices
42+
- Potential bugs or issues
43+
- Performance considerations
44+
- Security implications
45+
- Test coverage
46+
- Documentation updates if needed
47+
- Verify that README.md and docs are updated for any new features or config changes
48+
49+
Provide constructive feedback with specific suggestions for improvement.
50+
Use inline comments to highlight specific areas of concern.
51+
52+
claude_args: |
53+
--allowedTools "mcp__github__create_pending_pull_request_review,mcp__github__add_comment_to_pending_review,mcp__github__submit_pending_pull_request_review,mcp__github__get_pull_request_diff"

0 commit comments

Comments
 (0)