feat: improve PR review examples with context and tools (#504)

- Add PR repository and number to review prompts
- Note that PR branch is already checked out
- Update allowed tools to use inline comments and gh CLI
- Remove experimental review mode example in favor of standardized approach

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Ashwin Bhat
2025-08-28 09:02:27 -07:00
committed by GitHub
parent 8a20581ed5
commit 0c127307fa
4 changed files with 28 additions and 48 deletions

View File

@@ -22,7 +22,12 @@ jobs:
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: |
Please review this pull request and provide comprehensive feedback.
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}
Please review this pull request.
Note: The PR branch is already checked out in the current working directory.
Focus on:
- Code quality and best practices
@@ -34,7 +39,10 @@ jobs:
- Verify that README.md and docs are updated for any new features or config changes
Provide constructive feedback with specific suggestions for improvement.
Use inline comments to highlight specific areas of concern.
Use `gh pr comment:*` for top-level comments.
Use `mcp__github_inline_comment__create_inline_comment` to highlight specific areas of concern.
Only your GitHub comments that you post will be seen, so don't submit your review as a normal message, just as comments.
If the PR has already been reviewed, or there are no noteworthy changes, don't post anything.
claude_args: |
--allowedTools "mcp__github__create_pending_pull_request_review,mcp__github__add_comment_to_pending_review,mcp__github__submit_pending_pull_request_review,mcp__github__get_pull_request_diff"
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*), Bash(gh pr diff:*), Bash(gh pr view:*)"