Skip to main content

classify_commit

Function classify_commit 

Source
pub fn classify_commit(
    commit_message: &str,
    diff: &CommitDiff,
) -> Classification
Expand description

Classifies a commit as archive activity or not.

A commit is archive activity when EITHER the commit message’s subject line matches the canonical archive pattern OR the diff moves files into openspec/changes/archive/<name>/ and/or adds/updates a main spec under openspec/specs/<capability>/spec.md. The returned reason names every signal that fired (including the matched subject and/or detected path) so the user can diagnose a false positive.