Skip to content

feat(pr-checks): pr-body checks the description fills the template and links issues in the repository's form - #22

Draft
PiquelChips wants to merge 2 commits into
feat/pr-checksfrom
feat/pr-check-body
Draft

PiquelChips wants to merge 2 commits into
feat/pr-checksfrom
feat/pr-check-body

Conversation

@PiquelChips

@PiquelChips PiquelChips commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

What and why

A description that skips "what was wrong" or "how it was tested" reaches review anyway, and an issue closed with Closes #12 in piqueld, whose issues live in Linear, closes nothing there. This adds pr-body (G3, and G7 as changed) to the pull request checks of #21.

  • Template headings: it reads .github/pull_request_template.md from the pull request's base through the API, and every heading of it must be in the description with text under it.
    • HTML comments (the template's prompts) don't count as text, so a description that only keeps the template's comments fails.
    • Headings match case-insensitively. A subsection counts as its parent's text, and a # line inside a code fence isn't a heading.
    • A repository with no template is told to add one, with ## What and why and ## Testing.
  • Issue link: optional. A closing keyword (close, fix, resolve and their forms) must read Fixes <prefix><number>, where the prefix is the new issue-prefix input: # by default, PQD- for piqueld. Anything else (Closes #12, Fixes #12 where issues live in Linear, Fixes owner/repo#12) fails, and the finding says to write Fixes … to close the issue or Part of … to only link it. Links in code, inline or fenced, close nothing, so they don't count.
  • The crate's README lists the check and the input, and its example caller passes issue-prefix: PQD-.

Testing

  • 9 new Node tests (24 in all), on a fake GitHub API:
    • descriptions that fill or skip headings, or keep only the prompts;
    • heading case, subsections and fences;
    • a repository with no template;
    • links in and out of form, including links inside comments and code.
  • just check-changed origin/feat/pr-checks passes.
  • Dogfood: this pull request's own PR run checks its title and this description.
    • Its first run failed on this description. The check read the example links quoted in backticks above, like Closes #12, as real links.
    • GitHub closes nothing from code, so the second commit makes the check skip inline code and fences.

Checklist

  • The crate's README (its documentation on docs.rs) shows the change, and a repository's xtask can still follow it.
  • A change to the public API is noted for the next release, with what each repository's xtask must change. (No API change. piqueld passes issue-prefix: PQD-.)
  • just check-changed passes.

Note

Written by Claude Opus 5.5 in Claude Code (via T3 Code)

…d links issues in the repository's form

pr-body (G3, G7) fails when the description lacks a heading of the
repository's pull request template or leaves one empty, and when a closing
issue link isn't Fixes <prefix><number>, the prefix from the new
issue-prefix input.
Dogfooding flagged the examples this pull request's own description
quotes in backticks.
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