How to configure Renovate to use angular style commit messages for breaking changes #33021
-
How are you running Renovate?Self-hosted Renovate If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.Self-hosted GitLab Please tell us more about your question or problemI have a project that uses semantic-releases and has a dependency For {
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:best-practices"],
"packageRules": [
{
"description": "Trigger breaking release for major updates",
"matchPackageNames": ["mylibrary"],
"matchUpdateTypes": ["major"],
"commitMessagePrefix": "feat(deps)!:"
},
{
"description": "Trigger feature release for minor updates",
"matchPackageNames": ["mylibrary"],
"matchUpdateTypes": ["minor"],
"semanticCommitType": "feat"
},
{
"description": "Trigger fix release for patch updates",
"matchPackageNames": ["mylibrary"],
"matchUpdateTypes": ["patch"],
"semanticCommitType": "fix"
}
]
} While this configuration mostly works, I've noticed an issue: for minor and patch updates, Renovate creates commit messages like Logs (if relevant)Logs
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I'm not sure it's possible to get it working as-is, but if not then the best solution would probably be to support configuration like this: |
Beta Was this translation helpful? Give feedback.
-
Puzzled on why I hadn't realized this earlier, but leaving |
Beta Was this translation helpful? Give feedback.
Puzzled on why I hadn't realized this earlier, but leaving
"semanticCommitType": "feat"
and defining a commit body works—for example,"commitBody": "BREAKING CHANGE: major update of {{packageName}}"
. This keeps the commit message title lowercase and allows to trigger breaking changes with the commit. For others reading this, note that some presets also usecommitBody
(e.g., to sign the commit), so please consult the documentation first.