Skip to content

docs: closing keyword goes in the PR description, once per issue - #283

Open
0xKT wants to merge 3 commits into
mainfrom
docs/fixes_keyword_per_issue
Open

docs: closing keyword goes in the PR description, once per issue#283
0xKT wants to merge 3 commits into
mainfrom
docs/fixes_keyword_per_issue

Conversation

@0xKT

@0xKT 0xKT commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

GitHub pairs one closing keyword with one reference. Fixes #NNN, #MMM closes
the first and merely mentions the second. PR #279 wrote seven issues after a
single keyword and left six of them open after merge; they were closed by hand.

Two one-line changes state the rule where a description actually gets written:

  • .github/pull_request_template.md - the Related Issues hint.
  • AGENTS.md, section 3.7 - the Related Issues filling rule.

A third drops Closes #123 from the commit-footer list in section 3.1. That
line was wrong on its own terms: section 3.3 already records that this repo
squash-merges and drops individual commit bodies, so a closing keyword in a
commit footer never reaches main and closes nothing.

The template hint also stops naming #123, which is a live open issue here, and
a placeholder should not be a real number.

Type

  • Fix
  • Feature
  • Docs
  • CI / tooling
  • Refactor
  • Other

Verification

Documentation only; no code paths change.

uv run pre-commit run --from-ref origin/main --to-ref HEAD   -> all hooks Passed or Skipped
make lint-python                                             -> ruff check / format --check clean
make test-python                                             -> 5525 passed, 48 skipped,
                                                                13 deselected in 271.05s
npx commitlint --from origin/main --to HEAD --config commitlint.config.cjs   -> OK
PYTHONPATH=. uv run python scripts/check_commit_messages.py origin/main..HEAD -> OK
PYTHONPATH=. uv run python scripts/check_large_files.py origin/main..HEAD     -> OK

grep -nP "[^\x00-\x7F]" .github/pull_request_template.md     -> 0 matches. The template is
    embedded into every PR description, which CI lints as ASCII-only, so it has to stay ASCII.
  • Relevant tests pass locally
  • Relevant lint / type checks pass locally
  • User-facing docs or screenshots are updated when needed

Risk

No behaviour change. The visible effect is a slightly longer hint under
Related Issues when a new PR opens.

Rollback is a revert of this branch.

  • Security impact considered
  • Backward compatibility considered
  • Rollback path is clear for risky changes

Related Issues

N/A

GitHub pairs a closing keyword with a single reference, so a comma list of
issue numbers after one keyword closes only the first. Both places that
document this section showed a single issue, and the template's hint was
itself shaped like a comma list, which is how a recent PR left seven issues
open after merge.

Three changes: the template names the rule where the body actually gets
written, the filling rules in AGENTS.md state it, and the
preview-verification list gains the gh query that reports what GitHub
parsed. The error is invisible in the rendered body and visible in that
output before merge.

The template's placeholder also stops being a real number. The one it named
is a live issue in this repo, and whether the keyword parser skips an HTML
comment is not something this branch established, so leaving the comment in
a description should not be able to close anything.

Co-authored-by: Claude (claude-opus-5[1m]) <noreply@anthropic.com>
@0xKT
0xKT requested a review from arelchan August 7, 2026 15:20
0xKT and others added 2 commits August 7, 2026 23:41
The rule is one line: repeat the keyword for every issue. The first draft
wrapped it in an explanation of how GitHub parses references, and added a
`gh pr view --json closingIssuesReferences` step to every PR opening. Once
the rule is stated where the description gets written, that check returns
the expected number every time, so it is a standing cost for a closed hole.

Keeps the template hint and the AGENTS.md filling rule, both one line.
Restores the preview-verification list to its four original steps.

Co-authored-by: Claude (claude-opus-5[1m]) <noreply@anthropic.com>
Section 3.1 listed `Closes #123` as a commit footer that auto-closes the
issue on merge. Section 3.3 already records that this repo squash-merges and
drops individual commit bodies, so such a footer never reaches main and
closes nothing. Sections 3.3 and 3.7 both place the closing keyword in the PR
description; this removes the one line that contradicted them.

Co-authored-by: Claude (claude-opus-5[1m]) <noreply@anthropic.com>
@0xKT 0xKT changed the title docs: repeat the closing keyword for every issue in a PR description docs: closing keyword goes in the PR description, once per issue Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant