Close the issues a release says it resolves - #173
Conversation
Pull requests here name the issue a bullet delivers as a trailing "(#123)", which is what the pull request template asks for and what the release notes are built from - but nothing ever acted on it. Issues sat open for months after the code that closed them shipped, and the only way to find them was to read every merged pull request against every open issue. The post step now reads those references out of the notes it just published, closes each issue and comments with the release tag. Only the parenthesized form counts. Prose refers to issues constantly ("see #123", "blocked on #456") and reading those would close issues a release merely mentions; a cross-repository reference names something this token has no business closing. An issue already closed is left as it was, and a number that turns out to be a pull request is skipped. Closing never fails the step. The release is the thing that had to happen, and a run reported as failed after publishing is worse than an issue left open - including when the token lacks the issues:write scope the feature needs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfEAq3cyHk3mrWpo8QA9db
Release notes carry code: a fenced workflow example, or an inline mention of the very syntax the reader is being taught. A reference written inside either is documentation, and closing on it closes whatever issue the example's number happens to name. The notes of this feature's own release are the proof - they explain the form by writing it out, and that number in this repository is an unrelated dependency bump. It is already closed, so the state check would have caught it; that is luck, not a design. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfEAq3cyHk3mrWpo8QA9db
|
Reviewer notes. Why this exists. Triaging the org's backlog turned up 28 issues that had been delivered in shipped releases — some over a year earlier — and were still open, because the reference in the release notes was never acted on. Finding them meant cross-referencing 250 merged pull requests against every open issue by hand. This closes that loop at the point the information already exists. The parsing contract is deliberately narrow. Only One thing worth your attention: this PR found its own bug. The first commit's parser did not understand markdown code spans — and the release notes for this very feature document the syntax by writing Failure posture. Closing runs after the release exists and can never fail the step. A run reported as failed after publishing is worse than an issue left open — including when the token lacks The default is on — Verification. |
Added
(#123)counts; prose mentions and cross-repository references are left alone. Needsissues: write, and is turned off withclose-resolved-issues: false