From 4f00300d9c82f142b73e64f8b61445c43af6f6b3 Mon Sep 17 00:00:00 2001 From: rzmk Date: Wed, 29 Nov 2023 15:12:35 -0500 Subject: [PATCH] chore: add chore to commit types, include explicit conditional logic --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 92f3909..78bd3a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -22,7 +22,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "commit-helper" -version = "0.1.0" +version = "0.1.1" dependencies = [ "inquire", ] diff --git a/Cargo.toml b/Cargo.toml index 2917b3d..fb864cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "commit-helper" -version = "0.1.0" +version = "0.1.1" edition = "2021" [[bin]] diff --git a/src/main.rs b/src/main.rs index 62ae069..aa58f31 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,7 +14,7 @@ fn main() { // Commit Type let commit_type_options = vec![ - "build", "ci", "docs", "feat", "fix", "perf", "refactor", "test", + "build", "ci", "chore", "docs", "feat", "fix", "perf", "refactor", "test", ]; let commit_type = Select::new("Type:", commit_type_options).prompt(); let commit_type = match commit_type { @@ -43,7 +43,7 @@ fn main() { match confirm { Ok(true) => { - if run_git_add { + if run_git_add == true { println!("Running git add -A"); if !dry_run { Command::new("git") @@ -54,7 +54,7 @@ fn main() { } println!("Running git commit -m \"{}\"", result_message); - if !dry_run { + if dry_run == false { Command::new("git") .args(["commit", "-m", result_message.as_str()]) .output()