Repository navigation
feat(pr-checks): a reusable workflow checks each pull request, starting with its title - #21
Draft
PiquelChips wants to merge 1 commit into
Draft
PiquelChips wants to merge 1 commit into
PiquelChips wants to merge 1 commit into
Conversation
This was referenced Nov 22, 2026
Draft
Draft
PiquelChips
force-pushed
the
feat/readme-standard
branch
from
November 22, 2026 21:37
1264082 to
c4a57df
Compare
…ng with its title Adds .github/workflows/pr-checks.yml, which each repository calls from a small workflow, with its first check, pr-title (G2): titles are Conventional Commits of the standard's types and the scopes the repository allows. The logic lives in .github/pr-checks as Node scripts without dependencies, tested by just test-pr-checks in CI, and this repository dogfoods the workflow from pr.yml.
PiquelChips
force-pushed
the
feat/pr-checks
branch
from
November 22, 2026 22:13
1d57775 to
c8bed0d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Some rules of the standard are about the pull request itself, not the code: its title, its description, its commits, the exceptions it adds. Each repository would otherwise copy those checks into its own CI. This adds them here as one reusable workflow,
.github/workflows/pr-checks.yml, that each repository calls from a smallpr.yml. The first check ispr-title(G2). The pull requests stacked on this one add the others.pr-title: the title must betype(scope)!: subject. The type is one offeat fix refactor docs test chore ci perf build revert, and the scope, if any, one the caller allows in itsscopesinput. A finding names what's wrong, shows the expected form and gives an example in an allowed scope. It then says how to challenge the check, as the crate's violations do.pulls.get, so a re-run sees the current title, not the one from the original event. Actions are pinned by SHA, andpermissionsiscontents: readpluspull-requests: read, withtimeout-minuteson every job..github/pr-checks/as Node scripts with no dependencies. The workflow checks them out sparsely from this repository atjob.workflow_sha, so a caller pins one SHA and gets matching scripts.actions/github-scriptruns them.deviationsinput ofcheck = "why"lines turns that check's findings into notices, likestandard.toml's[deviations]. An unknown check name or an empty reason fails.pr-checksjob that the ruleset requires, besideci. A merge group passes it, since its pull requests already passed..github/workflows/pr.yml. CI's newpr-check-scriptsjob runsjust test-pr-checks.tools/xtask/src/ci.rsandfilters.ymlchanged to match.feat/readme-standard: CI'spr-check-scriptsjob is in thetools/xtask/src/ci.rstable, which the drift check now compares recipe by recipe.CODEOWNERSentry forstandard.toml,budget.toml,clippy.tomlanddeny.toml. AGENTS.md lists the workflow and adds it to Surfaces.Two required checks (the owner accepted this): a repository's ruleset requires
ci, for the code, andstandard / pr-checks, for the pull request. The checks can't go intoci: edits, labels and reviews re-run them, andci.ymlre-running on those events would either rebuild everything or replace a failedciwith a run that skipped the code. The README's adoption section says so.Testing
just check-changed origin/feat/readme-standardpasses: fmt, audit, unused,standard(so the new YAML stays withinconfig-comments), lint, doc, test (ci_matches_the_workflowincluded), doc-test, package andtest-pr-checks.path:line:prefix.PRrun checks its title.Checklist
.github/workflows/pr.ymland the required checkstandard / pr-checks.)just check-changedpasses.Note
Written by Claude Opus 5.5 in Claude Code (via T3 Code)