{{ message }}
Require issue assignment for non-SEP pull requests - #3332
Open
claude[bot] wants to merge 1 commit into
Open
Conversation
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.

Requested by Den Delimarsky · Slack thread
Motivation and Context
Before: Anyone can open a pull request against this repository without an associated issue. Unsolicited pull requests from authors who never discussed the change in an issue arrive regularly, and maintainers spend time triaging and closing them by hand.
After: Contributors making non-SEP changes find or open an issue first and get assigned before opening a pull request. A pull request that references no issue, or only issues the author is not assigned to, receives one explanatory comment linking the new CONTRIBUTING section and is closed automatically. A maintainer can reopen it once the author is assigned.
This adds an "Issue Assignment Before Pull Requests" section to CONTRIBUTING.md and a new workflow,
.github/workflows/pr-issue-assignment.yml, that enforces it.How Has This Been Tested?
The workflow YAML parses and the embedded script passes a Node syntax check. The logic was dry-run against three recent pull requests covering each outcome: #3300 (exempt, maintainer), #3296 (exempt, bot, with a linked unassigned issue), and #3288 (external author with no linked issue, would be closed).
Breaking Changes
No code or schema changes. New pull requests from external contributors are closed automatically unless they link an issue the author is assigned to or fall under an exemption.
Types of changes
Additional context
How it works: the workflow runs on
pull_request_targetfor opened and reopened events, usesactions/github-scriptonly, and never checks out PR code. It resolves linked issues with the GraphQLclosingIssuesReferencesquery plus a case-insensitive body scan for closing keywords. On a policy failure it posts one comment and closes the pull request. The comment carries an HTML marker so a reopened pull request is not commented on twice. Every decision path is logged in the job summary.Exemptions:
seps/ordocs/seps/skip-assignment-checklabelMaintainers can confirm or trim this list before merge. The
skip-assignment-checklabel must be created when this merges.Generated by Claude Code