Skip to content

Commit dbb805c

Browse files
vintaclaude
andcommitted
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 <[email protected]>
1 parent 3ae2cdf commit dbb805c

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/claude-pr-review.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,20 @@ jobs:
3939
plugins: "code-review@claude-code-plugins"
4040
prompt: |
4141
Review this PR against the acceptance criteria in CONTRIBUTING.md.
42-
Focus on: Industry Standard, Rising Star, or Hidden Gem criteria.
4342
Check for automatic rejection reasons (abandoned, duplicates, spam).
43+
44+
IMPORTANT: Only read README.md and CONTRIBUTING.md. Do not read or access any other files.
45+
4446
/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}
47+
48+
After your review, output your final decision on the LAST line in this exact format:
49+
DECISION: REJECT or DECISION: PASS
50+
51+
- name: Close PR if rejected
52+
if: contains(steps.claude-review.outputs.response, 'DECISION: REJECT')
53+
env:
54+
GH_TOKEN: ${{ github.token }}
55+
run: |
56+
gh pr close ${{ github.event.pull_request.number }} \
57+
--repo ${{ github.repository }} \
58+
--comment "This PR has been automatically closed based on the review. Please address the feedback and re-open the PR."

0 commit comments

Comments
 (0)