Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ reqwest = { version = "^0.13", features = ["json", "blocking"] }
serde = { version = "^1", features = ["derive"] }
serde_json = "^1"
toml = "^1.0"
commitbot_macros = { version = "0.1.0", path = "commitbot-macros" }

[dev-dependencies]
assert_cmd = "^2.1.1"
Expand Down
13 changes: 0 additions & 13 deletions commitbot-macros/Cargo.toml

This file was deleted.

44 changes: 0 additions & 44 deletions commitbot-macros/src/lib.rs

This file was deleted.

11 changes: 8 additions & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ use std::fs;
use std::path::{Path, PathBuf};

/// Final resolved configuration for commitbot.
#[derive(Debug, Clone, commitbot_macros::SensitiveFields)]
#[derive(Debug, Clone)]
pub struct Config {
/// LLM provider (openai, ollama)
pub provider: String,
/// OpenAI API key for authentication
#[sensitive]
/// OpenAI API key for authentication (sensitive – redacted in logs)
pub openai_api_key: Option<String>,
/// Base URL for the LLM provider
pub base_url: Option<String>,
Expand All @@ -26,6 +25,12 @@ pub struct Config {
}

impl Config {
/// Returns the names of fields that contain sensitive data (e.g. API keys).
/// These are redacted in debug/verbose log output.
pub fn sensitive_field_names() -> &'static [&'static str] {
&["openai_api_key"]
}

/// Build the final config from CLI flags, environment, TOML file, and defaults.
///
/// Precedence (highest to lowest):
Expand Down
Loading