mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
refactor: consolidate review workflows and use review mode
- Update claude-review.yml to use review mode instead of direct_prompt - Use km-anthropic fork action - Remove duplicate claude-review-mode.yml workflow - Add synchronize event to review PR updates - Update permissions for review mode (remove id-token, add pull-requests/issues write)
This commit is contained in:
13
.github/workflows/claude-review.yml
vendored
13
.github/workflows/claude-review.yml
vendored
@@ -2,13 +2,14 @@ name: Auto review PRs
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
types: [opened, synchronize]
|
||||
|
||||
jobs:
|
||||
auto-review:
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
pull-requests: write
|
||||
issues: write
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -18,9 +19,11 @@ jobs:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Auto review PR
|
||||
uses: anthropics/claude-code-action@main
|
||||
uses: km-anthropic/claude-code-action@main
|
||||
with:
|
||||
direct_prompt: |
|
||||
mode: review
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
custom_instructions: |
|
||||
Please review this PR. Look at the changes and provide thoughtful feedback on:
|
||||
- Code quality and best practices
|
||||
- Potential bugs or issues
|
||||
@@ -29,5 +32,3 @@ jobs:
|
||||
- Documentation consistency: Verify that README.md and other documentation files are updated to reflect any code changes (especially new inputs, features, or configuration options)
|
||||
|
||||
Be constructive and specific in your feedback. Give inline comments where applicable.
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
allowed_tools: "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"
|
||||
|
||||
Reference in New Issue
Block a user