Skip to content

commit

Conventional Commits: parse a message, decide the version bump, validate.

Commit parses type(scope)!: description with its body and footers, following the specification; Bump and bump_for turn a list of commits into the semantic-version bump they call for, is_valid is the yes/no shortcut, and emoji_for gives the gitmoji of the helpers4 convention.

Cargo feature commit (enabled by default). To compile only this module:

cargo add helpers4 --no-default-features --features commit

or in Cargo.toml:

[dependencies]
helpers4 = { version = "0.0.6", default-features = false, features = ["commit"] }

Import path: helpers4::commit.

ItemWhat it does
bump_forThe largest version bump called for by any of commits.
BumpHow much a set of changes raises a semantic version.
CommitA parsed Conventional Commits 1.0.0 message: type(scope)!: description, then an optional body and optional footers.
emoji_forThe emoji the helpers4 commit convention puts after the colon for a commit type, such as for feat and 🐛 for fix.
is_validWhether message is a valid Conventional Commit.

Documented on the page of the helper that returns them.

TypeReturned by
ParseCommitErrorCommit