Skip to content

Rework the PR template and check that it is filled in - #2689

Merged
amankrx merged 4 commits into
TraceMachina:mainfrom
amankrx:docs/pr-template-and-check
Aug 14, 2026
Merged

Rework the PR template and check that it is filled in#2689
amankrx merged 4 commits into
TraceMachina:mainfrom
amankrx:docs/pr-template-and-check

Conversation

@amankrx

@amankrx amankrx commented Aug 13, 2026

Copy link
Copy Markdown
Member

What and why

The PR template asks for things CI already proves and not much a reviewer actually needs, so it gets filled in as ceremony. Measured across the last 33 merged PRs that used it:

  • 29/33 tick "bazel test //... passes locally". Nobody runs the full suite before every PR, so the box carries no information.
  • 17/33 tick every box, including all four mutually exclusive "Type of change" options.
  • 15/33 leave "Please delete options that aren't relevant" in the body.
  • 14/33 have an effectively empty "How Has This Been Tested?", which is the one section a reviewer cannot get from the diff.
  • 6/33 leave "Fixes # (issue)" verbatim.

Several of those are mine. This replaces it with three sections that each ask for something only the author knows: what problem this solves, how it was actually verified, and what breaks if it is wrong. All guidance moved into HTML comments so it cannot leak into the permanent record.

The checklist is gone. bazel test //..., formatting and lints are already CI jobs and pre-commit hooks, which enforce them properly rather than on the honour system.

How this was verified

Ran the checker against real inputs: a filled-in body passes, the unedited template fails on all three sections, a body with no headings fails, an empty body fails, and a body with "n/a" under a heading fails on that heading only. Also ran it against #2683, an existing PR using the old template, and confirmed it reports the headings as missing rather than crashing.

Workflow YAML parses and the triggers resolve as intended. I could not exercise the workflow end to end, since that only happens once it is on the default branch.

Risk

This is a process change, so it needs agreement rather than just review.

The check fails PRs whose description is thin, which is the point, but two details keep it from being hostile:

  • It skips bots and honours a skip-pr-template label, which a maintainer will need to create.
  • It comments saying exactly which section is short and re-runs on edited, so it goes green as soon as the author fixes it. A red X with no explanation is how you lose a drive-by contributor.

Open PRs written against the old template will fail this check the next time they are edited or pushed to. The label is the escape hatch, or hold the merge until the queue drains.

It runs on pull_request_target so it can comment on fork PRs, where a first-time contributor most needs the hint. Nothing from the PR is checked out or executed: the checkout is the base branch, and the description is only ever read from a file, never interpolated into a shell command.

No new third-party action; it reuses the actions/checkout pin already trusted in this repo and the preinstalled gh CLI.


This change is Reviewable

@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nativelink Ready Ready Preview Aug 14, 2026 2:07pm
nativelink-aidm Ready Ready Preview Aug 14, 2026 2:07pm

Request Review

@MarcusSorealheis MarcusSorealheis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread .github/pull_request_template.md Outdated

@modernmedici modernmedici left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just adjusted the wording in one place to make sense.

@amankrx
amankrx merged commit b76af1c into TraceMachina:main Aug 14, 2026
43 checks passed
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.

5 participants