Skip to content

Commit c96fd5d

Browse files
committed
ci: add claude code reviewer
1 parent fc58ed1 commit c96fd5d

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Claude Code PR Review
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
types: [opened, synchronize, reopened]
7+
8+
jobs:
9+
claude-code-review:
10+
if: |
11+
github.event.pull_request.draft == false
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
id-token: write
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Claude Code Review
20+
uses: anthropics/claude-code-action@v1
21+
with:
22+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
23+
use_sticky_comment: true
24+
prompt: |
25+
Please review this TypeScript OAuth2 server pull request with focus on:
26+
27+
1. **Breaking Changes**:
28+
- Check for any changes to public APIs, interfaces, or exported functions
29+
- Verify that existing method signatures haven't changed
30+
- Look for removals of public methods or properties
31+
- Check if any changes affect backward compatibility
32+
33+
2. **Test Coverage**:
34+
- Ensure new code has corresponding test files using Vitest
35+
- Verify test files follow the existing pattern (*.spec.ts)
36+
- Check that new features have adequate test coverage
37+
- Ensure edge cases and error scenarios are tested
38+
39+
3. **Documentation Updates**:
40+
- Check if changes to public APIs are documented in /docs
41+
- Verify that new features have documentation
42+
- Ensure README.md is updated if new functionality is added
43+
- Check that JSDoc comments are present for public methods
44+
45+
4. **Code Quality**:
46+
- Ensure TypeScript strict mode compliance
47+
- Check for proper error handling using OAuthException
48+
- Verify imports use .js extensions as per project standards
49+
- Confirm snake_case file naming convention is followed
50+
51+
Please provide specific feedback on any issues found and suggest improvements.

0 commit comments

Comments
 (0)