Skip to main content

CommitClassifier

Trait CommitClassifier 

Source
pub trait CommitClassifier: Send + Sync {
    // Required methods
    fn types(&self) -> &[CommitType];
    fn pattern(&self) -> &str;

    // Provided methods
    fn bump_level(&self, type_name: &str, breaking: bool) -> Option<BumpLevel> { ... }
    fn changelog_section(&self, type_name: &str) -> Option<&str> { ... }
    fn is_allowed(&self, type_name: &str) -> bool { ... }
}
Expand description

Single source of truth for commit type classification.

Required Methods§

Source

fn types(&self) -> &[CommitType]

Source

fn pattern(&self) -> &str

Commit message regex with named groups: type, scope, breaking, description.

Provided Methods§

Source

fn bump_level(&self, type_name: &str, breaking: bool) -> Option<BumpLevel>

Source

fn changelog_section(&self, type_name: &str) -> Option<&str>

Source

fn is_allowed(&self, type_name: &str) -> bool

Implementors§