This repository was archived by the owner on Aug 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414# --- Optional Issue Tracker Integration ---
1515# If true, the check-commit tool will require the --issue <ID> flag
1616# to be used with the commit command, ensuring all work is traceable.
17- issue_reference_required : false
17+ issue_reference_required : true
1818
1919checklist :
2020 # --- Code Quality & Testing (High-Impact Checks) ---
Original file line number Diff line number Diff line change @@ -63,17 +63,19 @@ fn main() -> anyhow::Result<()> {
6363
6464 if !no_verify {
6565 let checked = run_checklist_interactive ( & config. checklist ) ?;
66- if Confirm :: with_theme ( & ColorfulTheme :: default ( ) )
67- . with_prompt ( "Warning: Not all DoD items were checked. Proceed by adding a 'TODO' list to the commit message? (Y/n)" )
68- . interact ( ) ?
69- {
70- let todo_footer = build_todo_footer ( & config. checklist , & checked) ;
71- commit_message. push_str ( & todo_footer) ;
72- } else {
73- println ! ( "Commit aborted." ) ;
74- return Ok ( ( ) ) ;
66+ if checked. len ( ) != config. checklist . len ( ) {
67+ if Confirm :: with_theme ( & ColorfulTheme :: default ( ) )
68+ . with_prompt ( "Warning: Not all DoD items were checked. Proceed by adding a 'TODO' list to the commit message? (Y/n)" )
69+ . interact ( ) ?
70+ {
71+ let todo_footer = build_todo_footer ( & config. checklist , & checked) ;
72+ commit_message. push_str ( & todo_footer) ;
73+ } else {
74+ println ! ( "Commit aborted." ) ;
75+ return Ok ( ( ) ) ;
76+ }
7577 }
76- if config. issue_reference_required . unwrap_or ( false ) && issue {
78+ if config. issue_reference_required . unwrap_or ( false ) && ! issue {
7779 println ! ( "{}" , "Issue reference is required for commits." . red( ) ) ;
7880 return Err ( anyhow:: anyhow!( "Issue reference required" ) ) ;
7981 }
You can’t perform that action at this time.
0 commit comments