Skip to content

feat(LINCHPIN-5363): Allow wp-plugin and wp-theme as commit types - #10

Merged
surrealwebs merged 1 commit into
mainfrom
feat/LINCHPIN-5363/allow-wp-plugin-wp-theme-types
Aug 12, 2026
Merged

feat(LINCHPIN-5363): Allow wp-plugin and wp-theme as commit types#10
surrealwebs merged 1 commit into
mainfrom
feat/LINCHPIN-5363/allow-wp-plugin-wp-theme-types

Conversation

@surrealwebs

Copy link
Copy Markdown
Contributor

Task: LINCHPIN-5363

Overview

Adds wp-plugin and wp-theme to TYPES, and wporg/linchpin to DEP_SCOPES, in index.js. Updates README.md and index.test.js to document and cover both the existing scope form and the new type form.

Why

This config has always treated wp-plugin/wp-theme as scopes (update(wp-plugin): ..., build(deps): ...) — that's what the README and existing tests document. But linchpin/renovatebot-config's release-please-config.json defines dedicated "WordPress Plugins 🔌" / "WordPress Themes 🖌️" changelog sections keyed on commit type — release-please's changelog-sections schema only offers a type key, there's no scope key to group by — so that repo started emitting wp-plugin(wporg):, wp-plugin(linchpin):, and wp-theme(deps): on the assumption this package would accept those as types.

It never did. I verified this directly: downloaded the currently-published @linchpinagency/commitlint-config@1.2.0 from npm and ran its own explain() against those exact headers — all three fail ("wp-plugin" is not a valid type", "wporg" is not a valid scope", etc.). Every Renovate PR in that repo updating a WordPress plugin or theme has been generating a commit that fails this config outright, regardless of anything else going on there.

What changes, concretely

-const TYPES = ['add', 'improve', 'build', 'chore', 'ci', 'docs', 'feat', 'feature', 'fix', 'perf', 'refactor', 'remove', 'revert', 'style', 'test', 'update'];
+const TYPES = ['add', 'improve', 'build', 'chore', 'ci', 'docs', 'feat', 'feature', 'fix', 'perf', 'refactor', 'remove', 'revert', 'style', 'test', 'update', 'wp-plugin', 'wp-theme'];

-const DEP_SCOPES = ['deps-dev', 'deps', 'wp-plugin', 'wp-theme', 'npm', 'composer', 'actions'];
+const DEP_SCOPES = ['deps-dev', 'deps', 'wp-plugin', 'wp-theme', 'npm', 'composer', 'actions', 'wporg', 'linchpin'];

headerPattern and type-enum are both generated from these two arrays, so no other code changes.

This is purely additive — every header that passed before still passes. The scope form (update(wp-plugin): ...) and the new type form (wp-plugin(wporg): ...) are both valid at the same time; the README now says to prefer the scope form unless a repo's release-please-config.json specifically defines a dedicated section for the wp-plugin/wp-theme type, which is the one case that actually needs it today.

Verification

  • Added 5 new tests covering the type form (wp-plugin(wporg):, wp-plugin(linchpin):, wp-theme(deps):, the new wporg/linchpin scopes, and that the pre-existing scope form still works alongside it).
  • npx jest — all 44 tests pass (39 existing + 5 new), none modified.
  • This repo lints its own commits with the config it publishes (commitlint.config.js requires ./index.js directly) — the commit on this branch passed that hook.

Follow-up

Once this is published, linchpin/renovatebot-config has a companion PR ready to switch its WordPress plugin/theme rules from the update(wp-plugin):/update(wp-theme): workaround back to wp-plugin(wporg): / wp-plugin(linchpin): / wp-theme(deps):, so those updates land in their intended dedicated changelog sections.

🤖 Generated with Claude Code

wp-plugin and wp-theme were only ever valid scopes here (update(wp-plugin):,
build(deps):), matching this repo's own README and tests. But
release-please's changelog-sections groups strictly by commit type -
that schema has no scope key - so a repo whose release-please-config gives
WordPress plugins and themes their own changelog section has no way to
reach it without wp-plugin/wp-theme being the type.

linchpin/renovatebot-config's release-please-config.json already defines
"WordPress Plugins" and "WordPress Themes" sections keyed on exactly those
types, added on the assumption this package would accept them. It never
did, so every Renovate PR there updating a WordPress plugin or theme via
wp-plugin(wporg): / wp-plugin(linchpin): / wp-theme(deps): has been
generating a commit that fails this config outright.

Adds wp-plugin and wp-theme to TYPES, and wporg/linchpin to DEP_SCOPES so
the type form has a scope to pair with beyond the type name itself. Both
existing scope-form usages (update(wp-plugin):, build(deps):, etc.) and the
new type-form usages are valid at the same time - this is additive, nothing
that passed before stops passing. README and tests updated to document and
cover both forms.
Copilot AI lite review requested due to automatic review settings August 11, 2026 19:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates @linchpinagency/commitlint-config to accept WordPress plugin/theme updates as dedicated commit types (wp-plugin, wp-theme) in addition to the existing scope form, and adds wporg/linchpin as additional dependency-related scopes to support that type form (primarily for release-please changelog section routing).

Changes:

  • Add wp-plugin and wp-theme to the allowed type-enum list (and thus headerPattern).
  • Add wporg and linchpin to the allowed dependency scopes.
  • Update documentation and add Jest coverage for the new type+scope combinations while keeping the existing scope form valid.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
README.md Documents the new wp-plugin/wp-theme type form and expands the allowed dependency scope list.
index.test.js Adds tests confirming the new type form and new scopes lint successfully alongside the existing scope form.
index.js Extends the allowed type and dependency-scope enumerations to support new WordPress-specific commit headers.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@surrealwebs
surrealwebs merged commit 2b25ae5 into main Aug 12, 2026
6 checks passed
@surrealwebs
surrealwebs deleted the feat/LINCHPIN-5363/allow-wp-plugin-wp-theme-types branch August 12, 2026 00:43
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.

2 participants