mirror of
https://github.com/rzmk/commit-helper.git
synced 2025-12-19 05:29:24 +00:00
chore: add chore to commit types, include explicit conditional logic
This commit is contained in:
parent
66ab8a384a
commit
4f00300d9c
3 changed files with 5 additions and 5 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -22,7 +22,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|||
|
||||
[[package]]
|
||||
name = "commit-helper"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"inquire",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "commit-helper"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
edition = "2021"
|
||||
|
||||
[[bin]]
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue