Automatically reject clear contribution-policy violations - #161
Automatically reject clear contribution-policy violations#161dcartertwo wants to merge 4 commits into
Conversation
|
Good — the root I have enough to complete the review. Let me confirm there are no genuine bugs in the exemption logic order (e.g., a fixed PR that becomes compliant between the two fetches). The logic is sound. Let me finalize my assessment. The code is well-structured, tested, and the security posture around Let me reconsider two things carefully before concluding:
No actionable issues found. LGTM! |
|
|
||
| jobs: | ||
| enforce: | ||
| if: github.event.pull_request.draft == false |
There was a problem hiding this comment.
Is it intentional that we won't enforce this for draft PR's?
|
|
||
| on: | ||
| pull_request_target: | ||
| types: [opened, reopened, edited, synchronize, ready_for_review, converted_to_draft, labeled, unlabeled] |
There was a problem hiding this comment.
From GPT:
.github/workflows/contribution-policy.yml:5: edited, labeled, and unlabeled also fire for closed or merged PRs. Without checking state === "open", the bot can post a false rejection comment on an already merged PR.
The contribution policy has both objective requirements and a subjective final judgment. This automates only the objective rejection cases: incomplete author confirmations and patches over 30 changed lines. It deliberately does not decide whether a remaining PR is obviously correct or trivially verifiable; that stays with maintainers.
Because closing fork PRs requires a write-capable workflow, it executes only repository-owned code and never checks out the contributor’s branch.
Depends on #144.