Skip to content

Gate draft PRs too and rewrite the auto-close comment - #3378

Draft
maxisbey wants to merge 1 commit into
mainfrom
gate-drafts
Draft

Gate draft PRs too and rewrite the auto-close comment#3378
maxisbey wants to merge 1 commit into
mainfrom
gate-drafts

Conversation

@maxisbey

Copy link
Copy Markdown
Contributor

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_review trigger 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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Repository automation

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

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

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant