Tell Dependabot not to use conventional commits #1942
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dependabot automatically examines existing commits' messages to decide what style to use, if no
commit.prefix
is configured. But gitoxide prefers that conventional commits be used only in limited circumstances: the "purposeful conventional commits" style detailed inDEVELOPMENT.md
. Commits to bump dependencies should typically not be conventional, so Dependabot should not title its commits with prefixes that can be interpreted as meaningful conventional commits. But the style Dependabot has automatically picked here uses prefixes such asbuild(deps): ...
.In practice this does not cause serious problems so far and is unlikely ever to cause serious problems, so it would be fine to use Dependabot even if this behavior couldn't be changed. But there are a few reasons to configure Dependabot not to do this:
Cargo.toml
files than it currently does.cargo-smart-release
treats more conventional commit prefixes specially.Roughly speaking, this configures Dependabot not to use any prefix. There does not appear to be any way to suppress the use of a prefix to restore the exact same behavior as if Dependabot had detected not to use a prefix (in particular, setting
prefix
tonull
produces an error and Dependabot will not use the configuration). So this instead sets an empty string as the prefix.The difference between an empty prefix and no prefix, in terms of how Dependabot currently behaves for this repository, is that the commit message with an empty prefix does not start with a capital letter. But that is not a problem here, because we don't impose a stylistic preference as to whether to capitalize commit message titles; both styles are common, with the uncapitalized style being at least as common as the capitalized style.
To ensure this configuration works as intended, it has been tested in a fork (where force-pushing main doesn't cause any disruption). See EliahKagan#16 for details.