mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 06:54:13 +08:00
Simplify PR review: Use gh CLI to post comments
- Removed custom create_comment tool - Updated workflow to use gh pr comment command - Allowed Bash(gh pr comment:*) tool - Simplified prompt to be more user-friendly
This commit is contained in:
11
.github/workflows/claude-auto-review-test.yml
vendored
11
.github/workflows/claude-auto-review-test.yml
vendored
@@ -24,15 +24,16 @@ jobs:
|
||||
prompt: |
|
||||
Please review this PR and provide comprehensive feedback.
|
||||
|
||||
Use the mcp__github_inline_comment__create_inline_comment tool to add inline comments on specific lines where you have feedback.
|
||||
|
||||
In your review, provide thoughtful feedback on:
|
||||
Focus on:
|
||||
- Code quality and best practices
|
||||
- Potential bugs or issues
|
||||
- Suggestions for improvements
|
||||
- Overall architecture and design decisions
|
||||
- Documentation consistency
|
||||
|
||||
Be constructive and specific in your feedback.
|
||||
After completing your review, post it as a comment on the PR using this command:
|
||||
gh pr comment ${{ github.event.pull_request.number }} --body "YOUR_REVIEW_HERE"
|
||||
|
||||
Format your review nicely with markdown, using headers, bullet points, and code blocks as needed.
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
claude_args: "--allowedTools mcp__github_inline_comment__create_inline_comment,Read,Grep,Glob"
|
||||
claude_args: "--allowedTools Bash(gh pr comment:*),Read,Grep,Glob"
|
||||
|
||||
@@ -78,6 +78,8 @@ export const agentMode: Mode = {
|
||||
REPO_OWNER: context.repository.owner,
|
||||
REPO_NAME: context.repository.repo,
|
||||
CLAUDE_COMMENT_ID: process.env.CLAUDE_COMMENT_ID || "",
|
||||
PR_NUMBER: (context as any).entityNumber?.toString() || process.env.GITHUB_EVENT_PULL_REQUEST_NUMBER || "",
|
||||
ISSUE_NUMBER: (context as any).entityNumber?.toString() || "",
|
||||
GITHUB_EVENT_NAME: process.env.GITHUB_EVENT_NAME || "",
|
||||
GITHUB_API_URL:
|
||||
process.env.GITHUB_API_URL || "https://api.github.com",
|
||||
|
||||
Reference in New Issue
Block a user