diff --git a/examples/claude-auto-review.yml b/examples/claude-auto-review.yml index 004fdf3..dd3efe5 100644 --- a/examples/claude-auto-review.yml +++ b/examples/claude-auto-review.yml @@ -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:*)" diff --git a/examples/claude-experimental-review-mode.yml b/examples/claude-experimental-review-mode.yml deleted file mode 100644 index bc9a367..0000000 --- a/examples/claude-experimental-review-mode.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Claude Experimental Review Mode - -on: - pull_request: - types: [opened, synchronize] - issue_comment: - types: [created] - -jobs: - code-review: - # Run on PR events, or when someone comments "@claude review" on a PR - if: | - github.event_name == 'pull_request' || - (github.event_name == 'issue_comment' && - github.event.issue.pull_request && - contains(github.event.comment.body, '@claude 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 # Full history for better diff analysis - - - name: Code Review with Claude - uses: anthropics/claude-code-action@v1-dev - with: - anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} - # github_token not needed - uses default GITHUB_TOKEN for GitHub operations - prompt: | - Review this pull request comprehensively. - - Focus on: - - Code quality and maintainability - - Security vulnerabilities - - Performance issues - - Best practices and design patterns - - Test coverage gaps - - Be constructive and provide specific suggestions for improvements. - Use GitHub's suggestion format when proposing code changes. diff --git a/examples/claude-pr-path-specific.yml b/examples/claude-pr-path-specific.yml index 6830a2e..b01e9a2 100644 --- a/examples/claude-pr-path-specific.yml +++ b/examples/claude-pr-path-specific.yml @@ -28,7 +28,13 @@ jobs: with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} prompt: | + REPO: ${{ github.repository }} + PR NUMBER: ${{ github.event.pull_request.number }} + Please review this pull request focusing on the changed files. + + Note: The PR branch is already checked out in the current working directory. + Provide feedback on: - Code quality and adherence to best practices - Potential bugs or edge cases @@ -38,3 +44,6 @@ jobs: Since this PR touches critical source code paths, please be thorough in your review and provide inline comments where appropriate. + + claude_args: | + --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*), Bash(gh pr diff:*), Bash(gh pr view:*)" diff --git a/examples/claude-review-from-author.yml b/examples/claude-review-from-author.yml index 54cf559..7cca3d5 100644 --- a/examples/claude-review-from-author.yml +++ b/examples/claude-review-from-author.yml @@ -27,8 +27,13 @@ jobs: with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} prompt: | + REPO: ${{ github.repository }} + PR NUMBER: ${{ github.event.pull_request.number }} + Please provide a thorough review of this pull request. + Note: The PR branch is already checked out in the current working directory. + Since this is from a specific author that requires careful review, please pay extra attention to: - Adherence to project coding standards @@ -38,3 +43,6 @@ jobs: - Documentation Provide detailed feedback and suggestions for improvement. + + claude_args: | + --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*), Bash(gh pr diff:*), Bash(gh pr view:*)"