Initial commit
This commit is contained in:
38
examples/claude-auto-review.yml
Normal file
38
examples/claude-auto-review.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Claude Auto Review
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
||||
jobs:
|
||||
auto-review:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Automatic PR Review
|
||||
uses: anthropics/claude-code-action@beta
|
||||
with:
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
timeout_minutes: "60"
|
||||
direct_prompt: |
|
||||
Please review this pull request and provide comprehensive feedback.
|
||||
|
||||
Focus on:
|
||||
- Code quality and best practices
|
||||
- Potential bugs or issues
|
||||
- Performance considerations
|
||||
- Security implications
|
||||
- Test coverage
|
||||
- Documentation updates if needed
|
||||
|
||||
Provide constructive feedback with specific suggestions for improvement.
|
||||
Use inline comments to highlight specific areas of concern.
|
||||
# allowed_tools: "mcp__github__add_pull_request_review_comment"
|
||||
41
examples/claude-pr-path-specific.yml
Normal file
41
examples/claude-pr-path-specific.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Claude Review - Path Specific
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
paths:
|
||||
# Only run when specific paths are modified
|
||||
- "src/**/*.js"
|
||||
- "src/**/*.ts"
|
||||
- "api/**/*.py"
|
||||
# You can add more specific patterns as needed
|
||||
|
||||
jobs:
|
||||
claude-review-paths:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Claude Code Review
|
||||
uses: anthropics/claude-code-action@beta
|
||||
with:
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
timeout_minutes: "60"
|
||||
direct_prompt: |
|
||||
Please review this pull request focusing on the changed files.
|
||||
Provide feedback on:
|
||||
- Code quality and adherence to best practices
|
||||
- Potential bugs or edge cases
|
||||
- Performance considerations
|
||||
- Security implications
|
||||
- Suggestions for improvement
|
||||
|
||||
Since this PR touches critical source code paths, please be thorough
|
||||
in your review and provide inline comments where appropriate.
|
||||
41
examples/claude-review-from-author.yml
Normal file
41
examples/claude-review-from-author.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Claude Review - Specific Authors
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
||||
jobs:
|
||||
review-by-author:
|
||||
# Only run for PRs from specific authors
|
||||
if: |
|
||||
github.event.pull_request.user.login == 'developer1' ||
|
||||
github.event.pull_request.user.login == 'developer2' ||
|
||||
github.event.pull_request.user.login == 'external-contributor'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Review PR from Specific Author
|
||||
uses: anthropics/claude-code-action@beta
|
||||
with:
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
timeout_minutes: "60"
|
||||
direct_prompt: |
|
||||
Please provide a thorough review of this pull request.
|
||||
|
||||
Since this is from a specific author that requires careful review,
|
||||
please pay extra attention to:
|
||||
- Adherence to project coding standards
|
||||
- Proper error handling
|
||||
- Security best practices
|
||||
- Test coverage
|
||||
- Documentation
|
||||
|
||||
Provide detailed feedback and suggestions for improvement.
|
||||
36
examples/claude.yml
Normal file
36
examples/claude.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Claude PR Assistant
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_review_comment:
|
||||
types: [created]
|
||||
issues:
|
||||
types: [opened, assigned]
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
|
||||
jobs:
|
||||
claude-code-action:
|
||||
if: |
|
||||
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
|
||||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
|
||||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
|
||||
(github.event_name == 'issues' && contains(github.event.issue.body, '@claude'))
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
issues: read
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Run Claude PR Action
|
||||
uses: anthropics/claude-code-action@beta
|
||||
with:
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
timeout_minutes: "60"
|
||||
Reference in New Issue
Block a user