Gate draft PRs too and rewrite the auto-close comment - #3378
Draft
maxisbey wants to merge 1 commit into
Draft
Conversation
Drafts were skipped until marked ready for review, which let unlinked PRs sit open indefinitely as drafts. They now go through the same rule as any other PR. The comment the gate leaves is rewritten to be clearer about what happened, what (if anything) the author can do, and what to expect: it no longer implies the PR will be reopened, and says plainly that review capacity for community PRs is limited.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #3291. Two changes to the PR intake gate:
Drafts are gated too. The gate skipped drafts until they were marked ready for review, which meant an unlinked PR could sit open indefinitely as a draft. Drafts now go through the same rule as everything else. The
ready_for_reviewtrigger stays so drafts opened before this change are still evaluated when they flip.The auto-close comment is rewritten. The old text implied the PR would be reopened ("this one will be reopened", "nothing more you need to do") and packed everything into two dense paragraphs. The new one says what happened and why in one sentence, lists what the author can actually do for each situation (already assigned / no issue yet / issue exists but not assigned), and is upfront that review capacity for community PRs is very limited and most auto-closed PRs stay closed. CONTRIBUTING.md gets one clause noting drafts are covered.
Motivation and Context
Drafts were being used to keep unlinked PRs visible past the gate, and the closing comment was setting expectations we can't meet.
How Has This Been Tested?
node --test .github/scripts/pr_intake_gate.test.js— the two draft scenarios now expect a close; 29/29 pass. Both comment variants rendered and read through by hand.Breaking Changes
None for SDK users. External draft PRs without an assigned, linked issue are now closed on open/edit rather than on ready-for-review.
Types of changes
Checklist
Additional context
Already-closed PRs keep the old comment until their next gate event (edit, assignment, label change). Currently-open external drafts are evaluated on their next event, or by hand with
gh workflow run require-linked-issue.yml -f pr_number=N.AI Disclaimer