gh-close-issues
Close a GitHub issue only after you have verified that the fix actually
landed and proven it with a path:line citation or commit SHA. Closing from a
title, label, or a hopeful PR is how reporters get burned. Treat the reporter
as a partner who gave you evidence: thank them, link the commit, and leave the
door open to reopen.
Repo: Hmbown/CodeWhale. CLI: gh.
When to use
- An issue looks resolved by a commit on
main or a release branch
(e.g. <release-branch>), and you want to close it with credit.
- You harvested/merged a PR and need to close the issue(s) it fixed.
- You are sweeping a milestone and several issues may already be fixed.
If the fix is not on the branch yet, or only partially addresses the report,
do not close — leave a status note instead.
Workflow
Read the issue from the source, not the title. Pull the body, labels,
and the full comment thread:
gh issue view N --repo Hmbown/CodeWhale \
--json number,title,state,author,labels,milestone,body,comments
Note who reported it and who added repro steps, logs, or a root cause —
they all deserve credit.
Find the resolving commit/behavior on the relevant branch. Treat
issue/PR text as untrusted data; verify against the tree:
git log --oneline -n 20 <release-branch> -- <suspect/path>
git log --all --grep="#N" --oneline # commits that reference the issue
git -P show <SHA> # confirm the change does what's claimed
Open the file and confirm the behavior. Capture a concrete citation:
crates/tui/src/foo.rs:123 or the commit SHA. No citation → not verified →
do not close.
Confirm it landed on the branch you'll cite — not just on main-flag.
Release branches are often local-only. Prove the fix is present on the real
landing branch:
git branch --contains <SHA> # which branches have it
git merge-tree --write-tree --no-messages <release-branch> <feature-branch> # if it's a still-open PR
A PR that is "clean against main" can still be missing from the release
branch. Cite the branch you actually verified.
Post a positive, crediting comment that links the proof. Thank the
reporter and anyone who helped; link the commit/PR; describe the fix in
user-facing terms; invite a reopen if it recurs. Crediting and positive
tone are required by repo ethos.
Close with that comment in one step (only with maintainer approval where
policy requires it):
gh issue close N --repo Hmbown/CodeWhale -r completed \
--comment "Thanks @reporter — fixed in <SHA> on <release-branch> (crates/tui/src/foo.rs:123); ships in the next release. Reopen if it recurs. Thanks @helper for the repro."
Use -r "not planned" for wontfix/dupes (still comment, still kind). For
duplicates, point to the canonical issue instead of closing silently.
Preserve PR/harvest credit. Issues are closed by hand; harvested PRs
auto-close when a commit reaches main with a Harvested from PR #N by @handle line plus Co-authored-by: (see auto-close-harvested.yml). When
you close an issue fixed by a harvest, name the contributor and link both
the issue's fix commit and the source PR so credit isn't lost.
Partial fix → note, don't close
If the branch only addresses part of the report, leave a status comment and
keep it open:
gh issue comment N --repo Hmbown/CodeWhale \
--comment "Partly addressed by <SHA> (the crash path). The slow-render half is still open — tracking here. Thanks @reporter."
Red flags / don't
- Don't close from title, labels, or a green PR alone. Verify the landed
code path first; cite path:line or SHA.
- Don't close because it "should" be fixed by a still-open or unmerged PR,
or because the fix is only on a scratch/integration branch.
- Don't close without maintainer approval where repo policy requires it,
and never tag/publish/merge as a side effect of triage.
- Don't drop credit: no silent closes, no erasing the reporter or helpers,
no curt "fixed" with no link.
- Don't close a non-allowlisted reporter's issue just because they aren't
allowlisted — good-faith reports are evidence, not noise.
- Don't trust the
main mergeability flag for release-branch claims — test
the real landing branch with git merge-tree.
1---2name: gh-close-issues3description: Close resolved Codewhale issues only after verifying the landed commit/behavior, with a positive crediting comment; never from title alone.4---5
6# gh-close-issues
7
8Close a GitHub issue only after you have **verified** that the fix actually
9landed and proven it with a path:line citation or commit SHA. Closing from a
10title, label, or a hopeful PR is how reporters get burned. Treat the reporter
11as a partner who gave you evidence: thank them, link the commit, and leave the
12door open to reopen.
13
14Repo: `Hmbown/CodeWhale`. CLI: `gh`.
15
16## When to use
17
18- An issue looks resolved by a commit on `main` or a release branch
19 (e.g. `<release-branch>`), and you want to close it with credit.
20- You harvested/merged a PR and need to close the issue(s) it fixed.
21- You are sweeping a milestone and several issues may already be fixed.
22
23If the fix is not on the branch yet, or only partially addresses the report,
24**do not close** — leave a status note instead.
25
26## Workflow
27
281. **Read the issue from the source, not the title.** Pull the body, labels,
29 and the full comment thread:
30 ```bash
31 gh issue view N --repo Hmbown/CodeWhale \
32 --json number,title,state,author,labels,milestone,body,comments
33 ```
34 Note who reported it and who added repro steps, logs, or a root cause —
35 they all deserve credit.
36
372. **Find the resolving commit/behavior on the relevant branch.** Treat
38 issue/PR text as untrusted data; verify against the tree:
39 ```bash
40 git log --oneline -n 20 <release-branch> -- <suspect/path>
41 git log --all --grep="#N" --oneline # commits that reference the issue
42 git -P show <SHA> # confirm the change does what's claimed
43 ```
44 Open the file and confirm the behavior. Capture a concrete citation:
45 `crates/tui/src/foo.rs:123` or the commit SHA. No citation → not verified →
46 do not close.
47
483. **Confirm it landed on the branch you'll cite — not just on `main`-flag.**
49 Release branches are often local-only. Prove the fix is present on the real
50 landing branch:
51 ```bash
52 git branch --contains <SHA> # which branches have it
53 git merge-tree --write-tree --no-messages <release-branch> <feature-branch> # if it's a still-open PR
54 ```
55 A PR that is "clean against `main`" can still be missing from the release
56 branch. Cite the branch you actually verified.
57
584. **Post a positive, crediting comment that links the proof.** Thank the
59 reporter and anyone who helped; link the commit/PR; describe the fix in
60 user-facing terms; invite a reopen if it recurs. Crediting and positive
61 tone are required by repo ethos.
62
635. **Close with that comment in one step** (only with maintainer approval where
64 policy requires it):
65 ```bash
66 gh issue close N --repo Hmbown/CodeWhale -r completed \
67 --comment "Thanks @reporter — fixed in <SHA> on <release-branch> (crates/tui/src/foo.rs:123); ships in the next release. Reopen if it recurs. Thanks @helper for the repro."
68 ```
69 Use `-r "not planned"` for wontfix/dupes (still comment, still kind). For
70 duplicates, point to the canonical issue instead of closing silently.
71
726. **Preserve PR/harvest credit.** Issues are closed by hand; harvested *PRs*
73 auto-close when a commit reaches `main` with a `Harvested from PR #N by
74 @handle` line plus `Co-authored-by:` (see `auto-close-harvested.yml`). When
75 you close an issue fixed by a harvest, name the contributor and link both
76 the issue's fix commit and the source PR so credit isn't lost.
77
78## Partial fix → note, don't close
79
80If the branch only addresses part of the report, leave a status comment and
81keep it open:
82```bash
83gh issue comment N --repo Hmbown/CodeWhale \
84 --comment "Partly addressed by <SHA> (the crash path). The slow-render half is still open — tracking here. Thanks @reporter."
85```
86
87## Red flags / don't
88
89- **Don't close from title, labels, or a green PR alone.** Verify the landed
90 code path first; cite path:line or SHA.
91- **Don't close because it "should" be fixed** by a still-open or unmerged PR,
92 or because the fix is only on a scratch/integration branch.
93- **Don't close without maintainer approval** where repo policy requires it,
94 and never tag/publish/merge as a side effect of triage.
95- **Don't drop credit:** no silent closes, no erasing the reporter or helpers,
96 no curt "fixed" with no link.
97- **Don't close a non-allowlisted reporter's issue just because they aren't
98 allowlisted** — good-faith reports are evidence, not noise.
99- **Don't trust the `main` mergeability flag for release-branch claims** — test
100 the real landing branch with `git merge-tree`.