mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
Update workflow to use GitHub MCP tools for PR reviews
This commit is contained in:
16
.github/workflows/claude-auto-review-test.yml
vendored
16
.github/workflows/claude-auto-review-test.yml
vendored
@@ -31,16 +31,8 @@ jobs:
|
|||||||
- Overall architecture and design decisions
|
- Overall architecture and design decisions
|
||||||
- Documentation consistency
|
- Documentation consistency
|
||||||
|
|
||||||
After completing your review, write it to a file then post it as a PR comment using these commands:
|
Use the GitHub MCP tools to create a proper PR review with comments.
|
||||||
|
You can use mcp__github__create_pending_pull_request_review to start a review
|
||||||
1. First save your review to a file:
|
and mcp__github__submit_pull_request_review to submit it as a COMMENT (not APPROVE).
|
||||||
cat > /tmp/pr-review.md << 'EOF'
|
|
||||||
YOUR_REVIEW_CONTENT_HERE
|
|
||||||
EOF
|
|
||||||
|
|
||||||
2. Then post it:
|
|
||||||
gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --body-file /tmp/pr-review.md
|
|
||||||
|
|
||||||
Make sure to format your review nicely with markdown headers, bullet points, and code blocks.
|
|
||||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
claude_args: "--allowedTools Bash(gh pr comment:*),Read,Grep,Glob"
|
claude_args: "--allowedTools mcp__github__create_pending_pull_request_review,mcp__github__submit_pull_request_review,Read,Grep,Glob"
|
||||||
|
|||||||
Reference in New Issue
Block a user