Repository navigation
Let maintainers exempt a pull request from the PR gate's linked-issue check - #6200
Merged
ymichael merged 1 commit intoOct 24, 2026
Merged
Conversation
… check A skip-issue-check label skips the linked-issue requirement. Adding it to a closed needs-issue pull request reopens it when the other checks pass. Closed pull requests report maintainer_can_modify as false, so the re-check on edit or label now reads a needs-maintainer-edits label that the gate adds when it closes for that reason. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
deleted the
bb/implement-pr-override-functionality-thr_iegshhdusf
branch
October 24, 2026 00:01
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.
Human comments
What was wrong
Maintainers had no way to exempt a pull request from the PR gate's linked-issue requirement (#6189). Reopening one by hand sends a
reopenedevent, the gate runs again, finds no linked issue, and closes it again. #6198 is an example.Separately, GitHub reports
maintainer_can_modify: falseon every closed pull request. #6198 hadMAINTAINER_CAN_MODIFY: truein itsopenedrun (40040917882) and reportsfalsenow, and every closed fork PR in the repo showsfalse. When the gate re-checked a closedneeds-issuePR after an edit, it read that stale value as "maintainer edits off" and wouldn't reopen it. So "this pull request reopens on its own once you save the description" probably never worked for PRs from personal forks.What changed
.github/workflows/pr-gate.yml:skip-issue-checklabel: when the label is present, the linked-issue check is skipped. The gate now also runs onlabeledevents. Adding this label to a closedneeds-issuePR goes through the same re-check as editing its description: the gate reopens the PR if the author is approved and maintainer edits were on. Other labels are ignored. Only accounts with triage access or higher can add labels, so contributors can't exempt themselves.needs-maintainer-editslabel: when the gate closes a PR because "Allow edits by maintainers" is off, it now adds this label. The re-check after an edit or label reads this label instead of the stalemaintainer_can_modify. Onopenedandreopened, the gate still readsmaintainer_can_modifyas before. PRs closed for edits-off before this change don't have the label, so a re-check could reopen one of them.CONTRIBUTING.md: documents the maintainer exemption under "Linked Issue".I created the
skip-issue-checklabel in the repo.How you verified
I pulled the
runscript out of the workflow, checked it withbash -n, and ran it against a stubbedghin eight scenarios. Each produced the expectedgh prcalls:needs-issueskip-issue-checkadded to a closed PR (with the stalemaintainer_can_modify=false) → reopenedFixes #Non a closed PR (stalefalse) → reopenedskip-issue-checkadded, but the PR hasneeds-maintainer-edits→ stays closedskip-issue-check→ stays openskip-issue-checkadded, but the author is not approved → stays closedneeds-maintainer-editsNone of this has run on real GitHub events yet.
pull_request_targettakes effect only after merge, and #6198 is the first real case.🤖 Generated with Claude Code