pub struct CommitAnalysis {
pub detected_type: String,
pub detected_scope: String,
pub proposed_message: String,
pub file_changes: FileChanges,
pub diff_summary: String,
pub diff_file: String,
pub file_diffs: Vec<FileDiffRef>,
}Expand description
Commit analysis information.
Fields§
§detected_type: StringAutomatically detected conventional commit type (feat, fix, docs, test, chore, etc.).
detected_scope: StringAutomatically detected scope based on file paths (cli, git, data, etc.).
proposed_message: StringAI-generated conventional commit message based on file changes.
file_changes: FileChangesDetailed statistics about file changes in this commit.
diff_summary: StringGit diff –stat output showing lines changed per file.
diff_file: StringPath to diff file showing line-by-line changes.
file_diffs: Vec<FileDiffRef>Per-file diff references for individual file changes.
Implementations§
Source§impl CommitAnalysis
impl CommitAnalysis
Sourcepub fn analyze_commit(repo: &Repository, commit: &Commit<'_>) -> Result<Self>
pub fn analyze_commit(repo: &Repository, commit: &Commit<'_>) -> Result<Self>
Analyzes a commit and generates analysis information.
Sourcepub fn refine_scope(&mut self, scope_defs: &[ScopeDefinition])
pub fn refine_scope(&mut self, scope_defs: &[ScopeDefinition])
Re-detects scope using file_patterns from scope definitions.
More specific patterns (more literal path components) win regardless of definition order in scopes.yaml. Equally specific matches are joined with “, “. If no scope definitions match, the existing detected_scope is kept as a fallback.
Trait Implementations§
Source§impl Clone for CommitAnalysis
impl Clone for CommitAnalysis
Source§fn clone(&self) -> CommitAnalysis
fn clone(&self) -> CommitAnalysis
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more