Skip to content

Commit

Permalink
fix(config): handled better using config-rs (#120)
Browse files Browse the repository at this point in the history
closes #118
  • Loading branch information
cococonscious authored Dec 17, 2024
1 parent 00188c1 commit 46637f8
Show file tree
Hide file tree
Showing 7 changed files with 381 additions and 127 deletions.
188 changes: 187 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ emojis = "0.6"
git2 = "0.18"
indexmap = "2.1"
serde = { version = "1.0", features = ["derive"] }
toml = "0.8"
inquire = "0.7.5"
clap_complete_command = { version = "0.6.1", features = ["nushell"]}
inquire = "0.7"
clap_complete_command = { version = "0.6", features = ["nushell"]}
config = { version = "0.14", features = ["toml"] }

[features]
vendored-openssl = ["git2/vendored-openssl"]
Expand Down
2 changes: 2 additions & 0 deletions meta/config/default.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
autocomplete = false
breaking_changes = true
issues = true
emoji = false
sign = false

[[commit_types]]
name = "feat"
Expand Down
4 changes: 2 additions & 2 deletions src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct Args {
help_heading = Some("Configuration"),
help = "Path to a custom config file"
)]
config: Option<String>,
config: Option<PathBuf>,

#[arg(
long,
Expand Down Expand Up @@ -171,7 +171,7 @@ fn main() -> Result<()> {
is_breaking_change,
scope,
summary,
} = get_extracted_answers(answers, &config)?;
} = get_extracted_answers(answers, config.emoji, &config.commit_types)?;

// Do the thing!
if hook {
Expand Down
Loading

0 comments on commit 46637f8

Please sign in to comment.