Skip to content

feat(LINCHPIN-5363): Restore wp-plugin and wp-theme commit types - #15

Merged
surrealwebs merged 4 commits into
fix/LINCHPIN-5363/restore-project-wordpress-prefixesfrom
feat/LINCHPIN-5363/restore-wp-plugin-wp-theme-types
Aug 12, 2026
Merged

surrealwebs merged 4 commits into
fix/LINCHPIN-5363/restore-project-wordpress-prefixesfrom
feat/LINCHPIN-5363/restore-wp-plugin-wp-theme-types

Conversation

@surrealwebs

Copy link
Copy Markdown
Contributor

Task: LINCHPIN-5363

⚠️ Depends on linchpin/commitlint-config#10. Do not merge this before that PR lands and a new version of @linchpinagency/commitlint-config publishes — every commit this preset generates for a WordPress plugin/theme update would fail commitlint until then.

This is stacked on #14 (fix/LINCHPIN-5363/restore-project-wordpress-prefixes) — the diff below is only the incremental change on top of it, and the base branch for this PR is that branch, not main.

Overview

#14 fixed the 6 WordPress plugin/theme rules by switching them to update(wp-plugin): / update(wp-theme):, because that was the only type+scope combination the currently published @linchpinagency/commitlint-config accepted. That was always meant to be interim — update/build land in generic changelog sections, not the dedicated "WordPress Plugins 🔌" / "WordPress Themes 🖌️" sections release-please-config.json already defines for the wp-plugin/wp-theme type.

Once commitlint-config#10 publishes, this PR switches those same 6 rules back to the type form they were always meant to use:

Rule #14 (interim) This PR
Themes (major/minor) update(wp-theme): WordPress wp-theme(deps): WordPress
Plugins wordpress.org (major/minor) update(wp-plugin): WordPress wporg wp-plugin(wporg): WordPress
Plugins packagist.linchpin.com (major/minor) update(wp-plugin): WordPress linchpin wp-plugin(linchpin): WordPress

The wporg/linchpin source label moves back into the scope ((wporg), (linchpin)), which is where it lived before #14's workaround and is what commitlint-config#10 adds scopes for.

A judgment call worth flagging

I dropped the duplicate wporg/linchpin word from the subject that #14 added there as a workaround for not having those as valid scopes yet. Keeping it would read as wp-plugin(wporg): WordPress wporg Update dependency ... — the same word twice in one line for no reason, now that the scope carries it again. I kept WordPress in the subject, since that's the distinction you originally asked to have back and it's independent of which type/scope form carries the wporg/linchpin split. If you'd rather keep the wporg/linchpin subject word too for belt-and-suspenders redundancy, easy to add back — just say so.

Verification

Same three checks as #14, run against a local copy of commitlint-config with #10's change applied (since the published package doesn't have it yet):

  • jq empty default.json — valid strict JSON.
  • npx --package renovate@44 renovate-config-validator --no-global default.json automerge.json — passes.
  • Every rendered header and commitBody line in default.json run through the patched explain() — all 38 checks pass.

🤖 Generated with Claude Code

Depends on linchpin/commitlint-config#10, which adds wp-plugin/wp-theme
to TYPES and wporg/linchpin to DEP_SCOPES. Do not merge this before that
lands and publishes.

The interim fix in the previous commit used update(wp-plugin): / update
(wp-theme): because that was the only type+scope combination the
published commitlint-config accepted at the time. Now that the type
form is supported, switches the 6 WordPress plugin/theme rules back to
wp-plugin(wporg):, wp-plugin(linchpin):, and wp-theme(deps): - the form
release-please-config's changelog-sections was already written for, so
these updates land in the dedicated "WordPress Plugins" / "WordPress
Themes" sections instead of the generic one.

The wporg/linchpin source label moves back into the scope, where it
came from originally. Dropped the duplicate wporg/linchpin word from the
subject that the interim fix added there as a workaround - it would
otherwise read twice in the same line for no reason now that the scope
carries it again. Kept the WordPress subject word from the prior commit,
since that is the distinction developers asked to have back, independent
of which type/scope form carries the wporg/linchpin split.

Verified against a local copy of commitlint-config with that PR's
change applied: every rendered header and commitBody line in default.json
passes explain(), and renovate-config-validator --no-global accepts both
preset files.
Copilot AI lite review requested due to automatic review settings August 11, 2026 19:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 the Renovate preset’s WordPress plugin/theme packageRules to restore wp-plugin and wp-theme as commit types (with deps/wporg/linchpin as scopes), aligning generated commit headers with the dedicated changelog sections those types map to (once the corresponding commitlint config update is published).

Changes:

  • Switched WordPress theme rules back from update(wp-theme): ... to wp-theme(deps): ... in both commitMessagePrefix and rendered commitBody lines.
  • Switched WordPress plugin rules back from update(wp-plugin): ... to wp-plugin(wporg|linchpin): ..., moving the source label back into scope.
Suppressed comments (3)

default.json:510

  • The Handlebars expression extracts the “name” by splitting depName on "-" and taking index 1. For Composer packages like "linchpin/some-theme" or "wpackagist-plugin/akismet", this renders incorrect/empty values (e.g., "theme" or "plugin/akismet"). Splitting on "/" first yields the actual package name reliably across all matched vendors.
      "commitBody": "{{#each upgrades as |upgrade|}}wp-theme(deps): {{replace '-' ' ' (lookup (split depName '-') 1 ) }} from {{{upgrade.currentValue}}} to {{{upgrade.newValue}}}\n{{/each}}"

default.json:574

  • The Handlebars expression extracts the “name” by splitting depName on "-" and taking index 1. For Composer packages like "linchpin/some-plugin" or "wpackagist-plugin/akismet", this renders incorrect/empty values (e.g., "plugin" or "plugin/akismet"). Splitting on "/" first yields the actual package name reliably across all matched vendors.
      "commitBody": "{{#each upgrades as |upgrade|}}wp-plugin(wporg): {{replace '-' ' ' (lookup (split depName '-') 1 ) }} from {{{upgrade.currentValue}}} to {{{upgrade.newValue}}}\n{{/each}}"

default.json:638

  • The Handlebars expression extracts the “name” by splitting depName on "-" and taking index 1. For Composer packages like "linchpin/some-plugin" this can render only the tail segment (or empty) instead of the full package name. Splitting on "/" first yields the actual package name reliably across all matched vendors.
      "commitBody": "{{#each upgrades as |upgrade|}}wp-plugin(linchpin): {{replace '-' ' ' (lookup (split depName '-') 1 ) }} from {{{upgrade.currentValue}}} to {{{upgrade.newValue}}}\n{{/each}}"

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

Comment thread default.json Outdated
Comment thread default.json Outdated
Comment thread default.json Outdated
Comment thread default.json
surrealwebs and others added 3 commits August 11, 2026 19:47
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@surrealwebs
surrealwebs merged commit bcac94f into fix/LINCHPIN-5363/restore-project-wordpress-prefixes Aug 12, 2026
1 check passed
@surrealwebs
surrealwebs deleted the feat/LINCHPIN-5363/restore-wp-plugin-wp-theme-types branch August 12, 2026 00:48
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