Skip to content

ci: close issues on release and note fixes merged into develop - #187

Merged
MarTrepodi merged 3 commits into
developfrom
ci/close-issues-on-release
Oct 13, 2026
Merged

MarTrepodi merged 3 commits into
developfrom
ci/close-issues-on-release

Conversation

@MarTrepodi

Copy link
Copy Markdown
Collaborator

Summary

GitHub only acts on closing keywords in PRs merged into the default branch (main). Every PR here merges into develop, so the 10 issues fixed in v2.5.0 stayed open and were closed by hand. This carries the keywords through to main, and tells the issue as soon as its fix lands on develop.

 PR "Closes #N" ─merge─▶ develop
-                          (keyword recorded, never fires)
+                          └─ push ─▶ issue-fixed-in-develop.yml
+                                      └─ comment on #N: "fixed in develop, closes on release"
 prepare-release ─▶ release PR body
+                     └─ closing_issues.py release: "- Closes #N (via #PR)" per open issue
 release PR ─merge─▶ main
-                      (no keywords: issues stay open)
+                      └─ GitHub closes #N
.github/
├── tools/closing_issues.py          # parse keywords from PR bodies + commit messages
│     release --since <tag>          #   → "Closes" section for the release PR
│     develop --sha <merge commit>   #   → comment on each open issue (idempotent marker)
└── workflows/
    ├── prepare-release.yml          # + step that writes the "Closes" section
    └── issue-fixed-in-develop.yml   # new; on push to develop

Evidence

Merge Danger

Door: two-way

Delete the workflow and the prepare-release step to undo. Comments already posted stay, but they're informational.

Blast Radius: issues

  • After merge, every push to develop that merges a PR with a closing keyword posts one comment per open issue. A hidden marker stops duplicates on re-runs.
  • Uses push, not pull_request_target, so no fork code runs with a write token. The job token has issues: write only.
  • The release PR body gains a "Issues resolved by this release" section; maintainers must keep it when copying the body in, or the issues won't close.

🤖 Generated with Claude Code

MarTrepodi and others added 3 commits October 13, 2026 10:03
Closing keywords ("Closes #12") only take effect for pull requests merged
into the default branch. Every PR here merges into develop, so GitHub
records the link and never closes the issue, and the release PR that
carries the fix to main has no keywords of its own. The issues fixed in
v2.5.0 had to be closed by hand.

Add .github/tools/closing_issues.py, which reads the keywords back out of
merged PRs (description and commit messages) using GitHub's matching
rules, and have prepare-release add a "Closes #N" line per still-open
issue to the release PR body. The issues then close when the release
merges into main. Run against v2.4.0..v2.5.0 it lists exactly the ten
issues that were left open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Until the next release reaches main, an issue fixed on develop stays open
with no sign of progress. On every push to develop, look up the merged PR,
find the still-open issues its closing keywords reference, and leave a
comment saying the fix is in develop and the issue closes on release. A
hidden marker keeps re-runs from posting the same note twice.

It runs on push rather than pull_request_target so it never handles fork
code with a write token, while still being able to comment for fork PRs.
CONTRIBUTING explains the linking rules and the release behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub treats a fence indented under a list item as code, but the
pattern only matched fences at column 0, so a keyword shown in such a
block was read as a real reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation ci Changes related to continuous integration processes labels Oct 13, 2026
@MarTrepodi
MarTrepodi force-pushed the ci/close-issues-on-release branch from cd6bf79 to 82a42dc Compare October 13, 2026 14:04
@MarTrepodi
MarTrepodi merged commit 3e081b7 into develop Oct 13, 2026
16 checks passed
@MarTrepodi
MarTrepodi deleted the ci/close-issues-on-release branch October 13, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Changes related to continuous integration processes documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant