#[derive(Debug, Default, serde::Deserialize)] pub struct TciConfig { #[serde(default)] pub allow_all: bool, #[serde(default)] pub branch: Option, #[serde(default)] pub hooks: Vec, } impl TciConfig { pub fn load() -> Result { let config_path = std::env::var("TCI_CONFIG") .unwrap_or_else(|_| "/etc/tci/config.toml".into()); let cfg_raw = std::fs::read_to_string(config_path) .unwrap_or_default(); toml::from_str(&cfg_raw) } }