Skip to content
This repository was archived by the owner on Aug 11, 2025. It is now read-only.

Commit 76968c4

Browse files
committed
fix: Update logic for both default and --no-veify branch
1 parent dacf543 commit 76968c4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/main.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ fn handle_interactive_commit(
5555
issue: &Option<String>,
5656
) -> Result<Option<String>> {
5757
let mut commit_message = base_message.to_string();
58-
if let Some(issue_ref) = issue {
59-
commit_message = format!("{} {}", issue_ref, commit_message);
60-
}
6158

6259
let checked = run_checklist_interactive(&config.checklist)?;
6360
if checked.len() != config.checklist.len() {
@@ -78,6 +75,13 @@ fn handle_interactive_commit(
7875
return Err(anyhow::anyhow!("Aborted: Issue reference required."));
7976
}
8077

78+
// Append the issue reference as a trailer/footer if required
79+
if config.issue_reference_required.unwrap_or(false) {
80+
if let Some(issue_ref) = issue {
81+
commit_message.push_str(&format!("\n\nRefs: {}", issue_ref));
82+
}
83+
}
84+
8185
Ok(Some(commit_message))
8286
}
8387

0 commit comments

Comments
 (0)