mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
name: Auto Review PRs
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
|
|
jobs:
|
|
auto-review:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
issues: write
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Auto review PR
|
|
uses: anthropics/claude-code-action@v1-dev
|
|
with:
|
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
prompt: |
|
|
Please review this pull request and provide comprehensive feedback.
|
|
|
|
Focus on:
|
|
- Code quality and best practices
|
|
- Potential bugs or issues
|
|
- Suggestions for improvements
|
|
- Overall architecture and design decisions
|
|
- Documentation consistency
|
|
|
|
Steps:
|
|
1. Use mcp__github__get_pull_request to get PR details
|
|
2. Use mcp__github__get_pull_request_diff to see the changes
|
|
3. Use mcp__github__create_pending_pull_request_review to start a review
|
|
4. Use mcp__github__add_comment_to_pending_review for specific feedback
|
|
5. Use mcp__github__submit_pending_pull_request_review with event: COMMENT to submit
|
|
|
|
Create a review with constructive feedback and submit it as a COMMENT (not APPROVE). |