Repository navigation
ci(pr-title): require a scope - #122
Merged
Merged
Conversation
The shared title check now requires type(scope): description. The optional ! stays after the scope. Tests cover no scope (refused), a scope (accepted), chore(release): version packages and the Dependabot title shape.
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
pr-title.ymlnow requires the scope in a pull request title:type(scope): description. The optional!stays after the scope. The header comment, the error message, README.md, CONTRIBUTING.md and CHANGELOG.md (Unreleased) say the scope is required, with an example.test/pr-title.test.mjscovers the new rule.Old pattern:
New pattern:
The title still reaches the shell through
env:only; the job still takes no input, checks nothing out and runs no action.Why
Merged commits on main read both
perf: ...andperf(parser): .... We want every pull request title, and so every squash commit, to readtype(scope): description. Each repo takes the rule when its pin of this workflow moves to a reference that carries this change; nothing changes in a caller before that.Proof
harness gate github-profile --fast: passed, 4 of 4 (actionlint,node --test, em-dash scan, package lists).test/pr-title.test.mjsagainst the old workflow: 4 failures (the no-scope titles are accepted, and every type with no scope). With the change: 53 pass, 0 fail.fix: keep the escape sequence in OBX-5,feat!: require Node 22 or later,chore: bump actions/checkout from 7.0.1 to 7.1.0, and each of the 11 types with no scope;fix(parser): keep the escape sequence in OBX-5,refactor(reader)!: one fail-closed reader, each of the 11 types with a scope;chore(release): version packages, whichrelease.ymlwrites (read from the file and run through the step);chore(deps): bump actions/checkout from 7.0.1 to 7.1.0and the capitalisedchore(deps): Bump ..., the shape Dependabot writes withprefix: choreandinclude: scope.prefix: choreandinclude: scope.Choices
Kind: code