Repository navigation
feat(NO-TASK): Emit commit prefixes that pass linchpin commitlint - #12
Merged
Merged
Conversation
Every prefix here produced a commit that @linchpinagency/commitlint-config rejects, so none of these updates could ever satisfy the org convention. Two separate problems. The scopes DEP, NPM, CMP, PLUGIN and THEME are not task keys, and deps and platform are not valid types at all. Worse, the leading [Project] and [WordPress] brackets made the parsed subject empty - headerPattern captures from the first character it can take - so release-please would write blank changelog entries for them. The dependency kind now lives in the scope, which is what the wider ecosystem does with build(deps) and chore(deps-dev), and what commitlint-config now accepts. The bracket is dropped; the subject Renovate generates already says what was updated. build(DEP): [Project] -> build(deps): platform(DEP): [Project] -> build(deps): deps(NPM): [WordPress] -> build(npm): deps(CMP): [WordPress] -> build(composer): update(PLUGIN): [WordPress] -> update(wp-plugin): update(THEME): [WordPress] -> update(wp-theme): wp-plugin and wp-theme match the package prefixes the rules already select on, so they carry over to the wp-packages.org move. commitBody templates are updated to match, since they repeat the prefix per upgrade.
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.
Pairs with commitlint-config#8. Merge that one first.
The problem
Every prefix in this preset produced a commit that
@linchpinagency/commitlint-configrejects. Across the org that is ~2,400 commits — none of them could ever satisfy the convention.Two separate faults:
DEP,NPM,CMP,PLUGIN,THEMEare not task keys. Anddeps/platformare not valid types at all.headerPatterncaptures the subject from the first character it can take, so a leading[Project]/[WordPress]parsed to an empty subject — release-please would write blank changelog entries for these.The change
The dependency kind moves into the scope, which is what the ecosystem already does (
build(deps),chore(deps-dev)) and what commitlint-config now accepts. The bracket is dropped — the subject Renovate generates already says what was updated.build(DEP): [Project]build(deps):platform(DEP): [Project]build(deps):deps(NPM): [WordPress]build(npm):deps(CMP): [WordPress]build(composer):update(PLUGIN): [WordPress]update(wp-plugin):update(THEME): [WordPress]update(wp-theme):WordPress updates stay obvious at a glance, and are now greppable:
git log --grep "^update(wp-plugin)".wp-plugin/wp-themematch the package prefixes these rules already select on (wpackagist-plugin/**,wp-plugin/**), so they carry over to the wp-packages.org move.Verification
All 19 prefixes remapped, no old form remains. Both preset files still parse, and every resulting message was linted through the real
commitlint:commitBodytemplates were updated too, since they repeat the prefix once per upgrade.Task: NO-TASK
🤖 Generated with Claude Code