ci: auto-close tracked issues when a tracking issue is closed#2993
Merged
Conversation
Contributor
Adds a workflow that, when an issue labeled `tracking` is closed, reads the issue numbers under its "### Issues" section and closes each one with a back-reference comment. PRs listed under "### PRs" are left untouched. - Manual workflow_dispatch refuses to fan-out unless the tracker is already closed, matching the `issues: closed` invariant (guards against an accidental bulk-close on an open issue). - Section terminator widened to any heading level so a deeper heading inside the Issues block can't leak unrelated #refs into the close set. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
thedotmack
force-pushed
the
chore/close-tracked-issues-workflow
branch
from
June 17, 2026 20:03
ed411fa to
43e34c0
Compare
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.
What
Adds
.github/workflows/close-tracked-issues.yml. When an issue labeledtrackingis closed, the workflow reads the issue numbers under that issue's### Issuessection and closes each one, leaving a comment pointing back to the tracker.This makes the 19 consolidated tracking issues (#2958–#2976) actually behave like trackers: close the master → its duplicate reports close automatically.
Why
GitHub's
Closes #Nkeyword only auto-closes on merged PRs/commits, never when an issue is closed. So issue-to-issue consolidation needs this glue.Behavior
issues: closed, guarded to issues carrying thetrackinglabel.### Issuesblock — PRs under### PRsare intentionally left untouched (those get merged, not closed).completedwith a back-reference comment.workflow_dispatchinput for on-demand fan-out close (useful for testing without closing the tracker).Verification
Ran the extraction regex against the live body of tracker #2959 — it returned exactly the 4 tracked issues (
2950, 2896, 2907, 2897) and correctly excluded the 2 related PRs (2536, 2920).🤖 Generated with Claude Code