Skip to content

Commit

Permalink
Forbid none empty values for base/head arg
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Sep 23, 2024
1 parent 85bb300 commit 2ddca81
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use anyhow::{anyhow, Context};
use api_clients::{ClientSet, RealClient};
use changes::RepoChangeset;
use clap::builder::styling::Style;
use clap::builder::NonEmptyStringValueParser;
use clap::{Parser, Subcommand};
use git2::Repository;
use helm_config::ImageRefs;
Expand Down Expand Up @@ -57,6 +58,7 @@ struct Cli {
env = "GITHUB_BASE_REF",
hide_env_values = true,
required = false,
value_parser = NonEmptyStringValueParser::new(),
global = true
)]
base: String,
Expand All @@ -68,6 +70,7 @@ struct Cli {
env = "GITHUB_HEAD_REF",
hide_env_values = true,
required = false,
value_parser = NonEmptyStringValueParser::new(),
global = true
)]
head: String,
Expand Down

0 comments on commit 2ddca81

Please sign in to comment.