mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-31 03:12:16 +00:00
Removes the pull_request trigger so the workflow only runs on explicit @claude mentions or manual workflow_dispatch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
name: Claude PR Review
|
|
|
|
on:
|
|
issue_comment:
|
|
types: [created]
|
|
pull_request_review_comment:
|
|
types: [created]
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: claude-review-${{ github.event.pull_request.number || github.event.issue.number || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
issues: write
|
|
id-token: write
|
|
|
|
jobs:
|
|
review:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
if: |
|
|
github.event_name == 'workflow_dispatch' ||
|
|
(github.event_name == 'issue_comment' &&
|
|
github.event.issue.pull_request &&
|
|
contains(github.event.comment.body, '@claude') &&
|
|
github.actor != 'claude[bot]') ||
|
|
(github.event_name == 'pull_request_review_comment' &&
|
|
contains(github.event.comment.body, '@claude') &&
|
|
github.actor != 'claude[bot]')
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Read review instructions
|
|
id: review
|
|
run: |
|
|
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
|
|
echo "instructions<<$EOF" >> "$GITHUB_OUTPUT"
|
|
cat REVIEW.md >> "$GITHUB_OUTPUT"
|
|
echo "$EOF" >> "$GITHUB_OUTPUT"
|
|
|
|
- uses: anthropics/claude-code-action@v1
|
|
with:
|
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
prompt: ${{ steps.review.outputs.instructions }}
|