Skip to content
SprecherEast
Issue 984

Pull request check: block a pull request while its issue needs grooming

Back to our plan
Done
ciprocesspriority: medium

Type

process

Summary

A pull request should not merge while the issue it closes is still flagged as needing grooming. The issue check warns on the issue; this makes the pull request gate the blocking side, so the plan and the code stay in step.

Details

Today: the issue check (#969) adds the needs grooming label and one comment when an issue misses a rule. The pull request gate (#970) checks the link, assignee and milestone of the linked issue, but does not read that label, so a flagged issue can still be closed by a merged PR.

Add one rule to the pull request gate: PR-GROOMED: the linked issue does not carry the needs grooming label. The message names the ID and says in one line what to fix (groom the issue, then the check removes the label). Reuse the helpers in .github/scripts/pr-body.mjs, with its tests first; no new system. Dependabot stays exempt.

Depends on the issue check landing (#969), since the label does not exist before it.

Rollout: many open issues will carry the label after the check's first runs. Open pull requests whose issue is flagged will fail on their next edit; groom the issue, then re-run the check.

Size: S. Shares pr-body.mjs and the process docs with the other gate issues, so it is worked after #969 merges.

Acceptance criteria

  • Not done: A pull request whose linked issue has needs grooming fails with PR-GROOMED; once the label is gone it passes.
  • Not done: The rule has a test written first, and the existing gate tests still pass.
  • Not done: The PR template and docs/process/project-management.md name the rule once, next to the other IDs.
  • Not done: Dependabot pull requests stay exempt.

Files likely touched

.github/scripts/pr-body.mjs, .github/scripts/pr-body.test.mjs, .github/workflows/pr-policy.yml, .github/pull_request_template.md, docs/process/project-management.md

Must not touch

src/, .github/workflows/issue-policy.yml, .github/workflows/issue-labels.yml

Open questions

None for the owner. Blocked by the issue check (#969).

Area

ci

Priority

medium


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab