Skip to main content

refine_message_scope

Function refine_message_scope 

Source
pub fn refine_message_scope(
    message: &str,
    files: &[&str],
    scope_defs: &[ScopeDefinition],
) -> String
Expand description

Replaces the scope in a conventional commit message with the deterministically resolved scope based on the given files and scope definitions.

If the message does not contain a conventional commit scope, or if no scope can be resolved from the files, the message is returned unchanged.