mirror of
https://github.com/vinta/awesome-python.git
synced 2026-05-24 17:16:55 +08:00
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:
@@ -39,6 +39,20 @@ jobs:
|
|||||||
plugins: "code-review@claude-code-plugins"
|
plugins: "code-review@claude-code-plugins"
|
||||||
prompt: |
|
prompt: |
|
||||||
Review this PR against the acceptance criteria in CONTRIBUTING.md.
|
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).
|
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 }}
|
/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."
|
||||||
|
|||||||
Reference in New Issue
Block a user