Repository navigation
Description
#475 documents that closing keywords must go in the promote PR body, because a keyword on a feature PR is squashed away before it reaches main and never fires. That is guidance only — nothing fails when a promote body omits them, so the next cycle can leak resolved issues exactly the way v1.4.0 did (#100, #101, #121 shipped closed-in-fact and stayed open; #108 had the keyword and closed cleanly).
Make it structural: a check that looks at a base: main PR body and flags a promote that resolves issues without saying so.
Where it goes
pr-gate (.github/workflows/registry-verification.yml:128) is a fan-in aggregator — it has no steps of its own beyond asserting that quick-checks, release-gate, node-20-compat, and fresh-payload-smoke all succeeded. A body check does not belong in that chain: it is instant, needs no checkout, and shares none of those dependencies.
Better as its own job, or its own small workflow, scoped to promote PRs:
if: github.event_name == 'pull_request' && github.base_ref == 'main'The PR body arrives in the event payload as github.event.pull_request.body, so no checkout and no extra permissions beyond the existing contents: read.
Three traps worth designing around
1. The default trigger will not re-run on a body edit. on: pull_request defaults to opened, synchronize, reopened — editing the description fires edited, which is not in that list. A maintainer who adds the keywords in response to a red check would watch it stay red with no way to re-run except pushing a commit.
Adding edited to the existing top-level on: pull_request: in registry-verification.yml would fix that at an unacceptable price: the whole workflow re-runs on every description edit, including four ~90-minute fresh-payload-smoke shards. Strong argument for a separate workflow file with its own types: [opened, reopened, edited, synchronize], so the cheap check can re-run freely while the expensive suite does not.
2. A promote that legitimately closes nothing must be able to pass. Some cycles are pure dependency bumps. A hard "body must contain closes #" would be wrong there, and the standard response to a check that is wrong sometimes is to stop reading it. Suggest requiring either a closing keyword or an explicit opt-out line, so the author states the intent either way:
No issues closed this cycle.
3. Deciding what should have been closed is the hard half. The check can verify a keyword is present, but not that it names the right issues. Enumerating what a promote resolves means walking main..dev for the constituent PRs and reading their bodies for keywords that were squashed away — doable via gh pr list --search, but meaningfully more work than a body regex.
Reasonable to split: ship the presence/opt-out check first, since it catches the actual v1.4.0 failure, and treat the "did you miss one?" enumeration as a follow-up. Worth being explicit that a green check means "you said something about issues", not "the list is right".
Branch protection
A new required check has to be added to main's protection rules to actually block, and the repo pins a ref-exact Actions allowlist — any new third-party action needs admitting there first. Easiest to write this in plain bash against the event payload and avoid a new action entirely.
Acceptance
- A
base: mainPR whose body has neither a closing keyword nor the opt-out line fails, and the message names both ways to satisfy it. - Editing the body to add either one turns the check green without a new commit.
- PRs into
devare unaffected. - The expensive suite does not re-run on description edits.
Activity
ci: require closing keywords in a promote PR body (#500)