|
| 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 | + - name: Claude Code Review |
| 19 | + uses: anthropics/claude-code-action@v1 |
| 20 | + with: |
| 21 | + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} |
| 22 | + prompt: | |
| 23 | + Please review this TypeScript OAuth2 server pull request with focus on: |
| 24 | +
|
| 25 | + 1. **Breaking Changes**: |
| 26 | + - Check for any changes to public APIs, interfaces, or exported functions |
| 27 | + - Verify that existing method signatures haven't changed |
| 28 | + - Look for removals of public methods or properties |
| 29 | + - Check if any changes affect backward compatibility |
| 30 | +
|
| 31 | + 2. **Test Coverage**: |
| 32 | + - Ensure new code has corresponding test files using Vitest |
| 33 | + - Verify test files follow the existing pattern (*.spec.ts) |
| 34 | + - Check that new features have adequate test coverage |
| 35 | + - Ensure edge cases and error scenarios are tested |
| 36 | +
|
| 37 | + 3. **Documentation Updates**: |
| 38 | + - Check if changes to public APIs are documented in /docs |
| 39 | + - Verify that new features have documentation |
| 40 | + - Ensure README.md is updated if new functionality is added |
| 41 | + - Check that JSDoc comments are present for public methods |
| 42 | +
|
| 43 | + 4. **Code Quality**: |
| 44 | + - Ensure TypeScript strict mode compliance |
| 45 | + - Check for proper error handling using OAuthException |
| 46 | + - Verify imports use .js extensions as per project standards |
| 47 | + - Confirm snake_case file naming convention is followed |
| 48 | +
|
| 49 | + Please provide specific feedback on any issues found and suggest improvements. |
0 commit comments