Skip to content

Commit

Permalink
refactor(check): Pull out fixup prefix
Browse files Browse the repository at this point in the history
epage committed Dec 18, 2024
1 parent 8ac2dfd commit 1b8f92e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/committed/src/checks.rs
Original file line number Diff line number Diff line change
@@ -348,14 +348,16 @@ pub(crate) fn check_fixup(
message: &str,
report: report::Report,
) -> Result<bool, anyhow::Error> {
if message.starts_with("fixup! ") {
if message.starts_with(FIXUP_PREFIX) {
report(report::Message::error(source, report::Fixup {}));
Ok(true)
} else {
Ok(false)
}
}

const FIXUP_PREFIX: &str = "fixup! ";

pub(crate) fn check_merge_commit(
source: report::Source<'_>,
commit: &git2::Commit<'_>,

0 comments on commit 1b8f92e

Please sign in to comment.