From 50f3fb8b9f293e8cf65b8c64ffd286d4db2ec8f5 Mon Sep 17 00:00:00 2001 From: Bittrance Date: Sun, 5 Nov 2023 16:53:23 +0100 Subject: [PATCH] Better naming for GitHub commit status option and config param. --- src/opts.rs | 6 +++--- src/task/github.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/opts.rs b/src/opts.rs index 6651fc8..4f46859 100644 --- a/src/opts.rs +++ b/src/opts.rs @@ -46,9 +46,9 @@ pub struct CliOptions { /// GitHub App private key file #[clap(long)] pub github_private_key_file: Option, - /// Turn on updating GitHub commit status with this context (requires auth flags) + /// Turn on updating GitHub commit status updates with this context (requires auth flags) #[clap(long)] - pub github_context: Option, + pub github_status_context: Option, /// Check repo for changes at this interval (e.g. 1h, 30m, 10s) #[arg(long, value_parser = humantime::parse_duration)] pub interval: Option, @@ -106,7 +106,7 @@ fn into_task(mut config: GitTaskConfig, opts: &CliOptions) -> ScheduledTask, + pub status_context: Option, } impl GithubConfig { @@ -39,7 +39,7 @@ impl TryFrom<&CliOptions> for Option { (Some(app_id), Some(private_key_file)) => Ok(Some(GithubConfig { app_id: app_id.clone(), private_key_file: private_key_file.clone(), - notify_context: opts.github_context.clone(), + status_context: opts.github_status_context.clone(), })), _ => Err(GitOpsError::InvalidNotifyConfig), } @@ -202,7 +202,7 @@ pub fn update_commit_status( ); let body = serde_json::json!({ "state": status, - "context": config.notify_context.unwrap(), + "context": config.status_context.unwrap(), "description": message, }); let res = client