You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: gate pull requests on a linked accepted issue #2272
Pull requests can merge without a linked issue, or with an issue that has not been accepted. The product rule is that an issue must be accepted (P0/P1/P2) before an implementation PR merges.
Proposal
Add scripts/issue-gate.mjs and scripts/issue-gate.test.mjs.
Run the gate from a pull_request_target workflow that checks out the base branch only, so the PR cannot modify the trusted gate definition.
On pull_request_target, fail the check when no accepted same-repository issue is linked.
Use closingIssuesReferences for Fixes/Closes/Resolves and a stripped parser for Refs; ignore fenced code, inline code, HTML comments, blockquotes and cross-repository refs.
On issues: labeled/unlabeled, find linked open PRs and create/update issue-gate check runs on their heads, so a priority-label change re-evaluates without a new commit.
Treat a PR record as not an issue; report API failures separately from policy failures.
After merge, add issue-gate as a required status check. The main ruleset already requires one approving review.
Non-goals
No merge automation, label changes or closing.
No exemption for routine dependency or typo PRs: AGENTS.md and CONTRIBUTING.md are updated to require a lightweight issue for every PR.
Acceptance
A PR with Fixes #<P1 issue> passes; no issue, P3 only, or a PR record fails.
Changing the linked issue from P1 to P3 makes the linked PR's check fail without a new commit.
The required gate definition comes from main; the PR cannot modify it.
Tests cover the parser, same-repository filtering and the accepted-label rule.
Closed by #2274 (merged 05:49Z). The issue-gate workflow and script are on main. Activating the required check on main remains a repository settings action outside this PR.
Activity
eric8810 commentedon Nov 28, 2026
Closed by #2274 (merged 05:49Z). The issue-gate workflow and script are on main. Activating the required check on main remains a repository settings action outside this PR.