Skip to content

fix(deps): stop double-deps in dependabot commit messages#49

Merged
jlc488 merged 1 commit into
mainfrom
fix/dependabot-commit-message-prefix
May 23, 2026
Merged

fix(deps): stop double-deps in dependabot commit messages#49
jlc488 merged 1 commit into
mainfrom
fix/dependabot-commit-message-prefix

Conversation

@jlc488
Copy link
Copy Markdown
Contributor

@jlc488 jlc488 commented May 23, 2026

Quick fix for the build(deps)(deps): ... (and build(ci)(deps): ...) double-scope titles dependabot was producing.

Root cause

commit-message:
  prefix: "build(deps)"  # scope inlined here
  include: "scope"       # dependabot also inserts "(deps)" between prefix and ":"

Dependabot composes <prefix><scope>: <message>"build(deps)" + "(deps)" + ":" + ... → doubled.

Fix

Keep include: "scope" (the part that varies per dep / group / ecosystem and is genuinely useful), trim prefix to just the conventional-commit type:

Ecosystem prefix before prefix after Example PR title
Gradle (SB3 entry) build(deps) build build(deps): bump foo from 1 to 2
Gradle (SB4 entry) build(deps) build build(deps): bump the spring-boot group ...
github-actions build(ci) ci ci(deps): bump actions/checkout from 5 to 6

Verification

Config-only. CI detect will identify zero demos changed (no *-demo/ paths touched) and build job will skip.

Test plan

  • CI green
  • Next Monday's dependabot run produces clean titles

Our dependabot.yml was producing PR titles like:

    build(deps)(deps): bump foo from 1 to 2
    build(ci)(deps): bump actions/checkout from 5 to 6

…with a doubled `(deps)` scope. Root cause was a config that put
the conventional-commit scope INSIDE the prefix AND told dependabot
to add it AGAIN:

    commit-message:
      prefix: "build(deps)"   ← scope already inlined here
      include: "scope"        ← dependabot also inserts "(deps)"
                                between prefix and ":"

Dependabot then composes:
    <prefix><scope>: <message>
    "build(deps)" + "(deps)" + ":" + ...
    → "build(deps)(deps): ..."

The fix is to keep `include: "scope"` (it's the part that varies per
dep / group / ecosystem and is genuinely useful) and trim `prefix`
down to just the conventional-commit type:

    Gradle ecosystem entries:
      prefix: "build(deps)" → "build"
      → "build(deps): bump foo from 1 to 2"
      → "build(deps-spring-boot): bump the spring-boot group ..."

    github-actions ecosystem entry:
      prefix: "build(ci)" → "ci"
      → "ci(deps): bump actions/checkout from 5 to 6"

Now titles read cleanly and the scope still distinguishes what kind
of bump landed.

All three commit-message blocks (SB3 gradle, SB4 gradle, github-
actions) updated in one pass; no other config touched.
@jlc488 jlc488 merged commit 4b10dc2 into main May 23, 2026
3 checks passed
@jlc488 jlc488 deleted the fix/dependabot-commit-message-prefix branch May 23, 2026 10:52
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