pub fn classify_commit(msg: &str) -> Option<ConventionalLevel>Expand description
Classify one commit message (subject + body) against the Conventional-Commits release rules.
Returns None for non-release-worthy commits: chore: / docs: /
style: / refactor: / test: / build: / ci: typed subjects and
unstructured messages.
Rules:
BREAKING CHANGE/BREAKING-CHANGEanywhere in the message → major. Matched as a bare substring (no trailing colon required) so a footer likeBREAKING CHANGE removed the old endpointstill majors.<type>!:/<type>(scope)!:breaking shorthand → major, for ANY type (refactor!:is still a breaking change).feat:/feat(scope):→ minor.fix:/perf:/revert:(and scoped variants) → patch.