feat: add structured decision format and auto-close for rejected PRs

Enhance the Claude PR review workflow with:
- Remove redundant criteria mention (already in CONTRIBUTING.md)
- Add file access restrictions to prevent unnecessary file reads
- Require structured DECISION output format for automation
- Auto-close rejected PRs with explanatory comment

🤖 Generated with Claude Code (https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Vinta Chen 2026-01-08 16:46:33 +08:00
parent 3ae2cdfc7f
commit dbb805c624
No known key found for this signature in database
GPG Key ID: B93DE4F003C33630

View File

@ -39,6 +39,20 @@ jobs:
plugins: "code-review@claude-code-plugins"
prompt: |
Review this PR against the acceptance criteria in CONTRIBUTING.md.
Focus on: Industry Standard, Rising Star, or Hidden Gem criteria.
Check for automatic rejection reasons (abandoned, duplicates, spam).
IMPORTANT: Only read README.md and CONTRIBUTING.md. Do not read or access any other files.
/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}
After your review, output your final decision on the LAST line in this exact format:
DECISION: REJECT or DECISION: PASS
- name: Close PR if rejected
if: contains(steps.claude-review.outputs.response, 'DECISION: REJECT')
env:
GH_TOKEN: ${{ github.token }}
run: |
gh pr close ${{ github.event.pull_request.number }} \
--repo ${{ github.repository }} \
--comment "This PR has been automatically closed based on the review. Please address the feedback and re-open the PR."