Skip to content

Commit ae0d348

Browse files
committed
config: remove unused webhook field from RunnerConfig
Runner webhooks are merged into job webhooks at parse time, so the field was never read after being set.
1 parent 22de6f4 commit ae0d348

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

CLAUDE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ struct RunnerConfig {
4444
timezone: TimezoneConfig,
4545
env_file: Option<String>, // Path to .env file (relative to repo root)
4646
env: Option<HashMap<String, String>>, // Inline env vars
47-
webhook: Vec<WebhookConfig>,
4847
}
4948

5049
// Parsed from rollcron.yaml

src/config.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ pub struct RunnerConfig {
6363
pub timezone: TimezoneConfig,
6464
pub env_file: Option<String>,
6565
pub env: Option<HashMap<String, String>>,
66-
pub webhook: Vec<WebhookConfig>,
6766
}
6867

6968
#[derive(Debug, Deserialize, Default)]
@@ -254,7 +253,6 @@ pub fn parse_config(content: &str) -> Result<(RunnerConfig, Vec<Job>)> {
254253
timezone: timezone.clone(),
255254
env_file: config.runner.env_file,
256255
env: config.runner.env,
257-
webhook: runner_webhook.clone(),
258256
};
259257

260258
let jobs = config
@@ -938,9 +936,7 @@ jobs:
938936
cron: "* * * * *"
939937
run: echo test
940938
"#;
941-
let (runner, jobs) = parse_config(yaml).unwrap();
942-
assert_eq!(runner.webhook.len(), 1);
943-
assert_eq!(runner.webhook[0].to_url(), "https://hooks.slack.com/test");
939+
let (_, jobs) = parse_config(yaml).unwrap();
944940
// Job inherits runner webhook
945941
assert_eq!(jobs[0].webhook.len(), 1);
946942
assert_eq!(jobs[0].webhook[0].to_url(), "https://hooks.slack.com/test");
@@ -974,8 +970,7 @@ jobs:
974970
cron: "* * * * *"
975971
run: echo test
976972
"#;
977-
let (runner, jobs) = parse_config(yaml).unwrap();
978-
assert!(runner.webhook.is_empty());
973+
let (_, jobs) = parse_config(yaml).unwrap();
979974
assert!(jobs[0].webhook.is_empty());
980975
}
981976

src/scheduler/executor.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ mod tests {
370370
timezone: TimezoneConfig::Utc,
371371
env_file: None,
372372
env: None,
373-
webhook: vec![],
374373
}
375374
}
376375

0 commit comments

Comments
 (0)