Skip to content

ci: PR template and a check that the description says how the change was verified - #26

Merged
sanctrl merged 1 commit into
mainfrom
ci/pr-verification
Nov 13, 2026
Merged

sanctrl merged 1 commit into
mainfrom
ci/pr-verification

Conversation

@sanctrl

@sanctrl sanctrl commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

What changes

Nothing user-visible. PRs now auto-merge when CI is green, so every PR description has to say how the change was verified.

  • .github/pull_request_template.md: a template with What changes / Verification / Risk and rollback.
  • pr-verification check: fails a PR whose ## Verification section is missing, or whose Tests:, Review: or Live check: line is empty. The failure message states the rule. Bot PRs pass.
  • Security: the checker runs from the base branch, so a PR can't change the rule it's checked against. It has a read-only token, uses pull_request (never _target), and never interpolates the body into the workflow.

Verification

  • Tests: parser 26/26 on Python 3.9, 3.12 and 3.14 (filled, untouched template, missing heading or line, bold labels, CRLF, "not needed: …", "n/a: …", comments, bots); actionlint 1.7.12 clean.
  • Review: workflow and template read by the lead before opening (token scope, base-branch checkout, no body interpolation).
  • Live check: n/a: CI-only change; this PR's own pr-verification run is the first live check.

Risk and rollback

A wrong parser could fail good PRs. The check isn't a required check yet; it's added only after these PRs pass. Rollback: revert, or drop it from the ruleset.

PRs auto-merge when CI is green and any agent or human may open one. The
template asks for What changes, Verification (Tests, Review, Live check) and
Risk and rollback. The pr-verification job fails a PR whose description has
no Verification heading, or a Tests/Review/Live check line that is missing
or holds only a placeholder; the failure says which and states the rule.
It does not judge what the lines say. PRs from dependabot[bot] and
github-actions[bot] pass.

The checker (.github/scripts/pr-verification.py, stdlib only) reads the
event payload and runs from the base branch, so a PR cannot change the rule
it is checked against; the PR that adds it falls back to its own copy.
@sanctrl
sanctrl enabled auto-merge (squash) November 13, 2026 19:52
@sanctrl
sanctrl merged commit 50681db into main Nov 13, 2026
12 checks passed
@sanctrl
sanctrl deleted the ci/pr-verification branch November 13, 2026 19:59
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