Skip to content

feat(NO-TASK): Emit commit prefixes that pass linchpin commitlint - #12

Merged
aaronware merged 1 commit into
mainfrom
feat/NO-TASK/conforming-commit-prefixes
Aug 8, 2026
Merged

aaronware merged 1 commit into
mainfrom
feat/NO-TASK/conforming-commit-prefixes

Conversation

@aaronware

Copy link
Copy Markdown
Contributor

Pairs with commitlint-config#8. Merge that one first.

The problem

Every prefix in this preset produced a commit that @linchpinagency/commitlint-config rejects. Across the org that is ~2,400 commits — none of them could ever satisfy the convention.

Two separate faults:

  1. Invalid scopes — DEP, NPM, CMP, PLUGIN, THEME are not task keys. And deps / platform are not valid types at all.
  2. The brackets broke the subject. headerPattern captures 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.

Before After
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-theme match 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:

update(wp-plugin): Update dependency wpackagist-plugin/imsanity to v2.9.3   PASS
update(wp-theme):  Update dependency wpackagist-theme/twentytwentyfive to v1.3  PASS
build(npm):        Update dependency webpack to v5.94.0                     PASS
build(composer):   Update dependency humbug/php-scoper to v0.18.19          PASS
build(deps):       Update dependency npm-run-all2 to v9.0.3                 PASS
build(deps):       Lock file maintenance                                    PASS

commitBody templates were updated too, since they repeat the prefix once per upgrade.

Task: NO-TASK

🤖 Generated with Claude Code

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.
@aaronware
aaronware merged commit 718e9df into main Aug 8, 2026
1 check 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.

1 participant