use std::path::PathBuf;
use clap::{Args, ValueEnum};
#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)]
pub(crate) enum StatusLane {
All,
LocalBeta,
ProductionGa,
}
impl StatusLane {
pub(crate) const fn as_str(self) -> &'static str {
match self {
Self::All => "all",
Self::LocalBeta => "local-beta",
Self::ProductionGa => "production-ga",
}
}
}
#[derive(Args)]
pub(crate) struct FixCliArgs {
#[arg(long)]
pub(crate) yes: bool,
#[arg(long, conflicts_with_all = ["yes", "ci"])]
pub(crate) preview: bool,
#[arg(long, conflicts_with = "yes")]
pub(crate) ci: bool,
#[arg(long, requires = "ci")]
pub(crate) strict: bool,
#[arg(long, value_name = "SCOPE")]
pub(crate) diff: Option<String>,
#[arg(long, hide = true)]
pub(crate) explain_rules: bool,
#[arg(long, value_name = "PATH", hide = true)]
pub(crate) report: Option<String>,
#[arg(long)]
pub(crate) json: bool,
#[arg(long, value_name = "PR", conflicts_with = "diff")]
pub(crate) pr: Option<String>,
#[arg(
long,
value_name = "NAME",
requires = "pr",
conflicts_with_all = ["no_checkout", "preview"],
hide = true
)]
pub(crate) work_branch: Option<String>,
#[arg(long, requires = "pr", hide = true)]
pub(crate) no_checkout: bool,
#[arg(long, requires = "pr", hide = true)]
pub(crate) allow_dirty: bool,
#[arg(long, requires = "pr", hide = true)]
pub(crate) no_upload_acceptance: bool,
pub(crate) path: Option<PathBuf>,
}
#[derive(Args)]
pub(crate) struct SyncCliArgs {
#[arg(long, conflicts_with = "push")]
pub(crate) pull: bool,
#[arg(long, conflicts_with = "pull")]
pub(crate) push: bool,
#[arg(long)]
pub(crate) dry_run: bool,
#[arg(long)]
pub(crate) json: bool,
}
#[derive(Args)]
pub(crate) struct ImportReviewsCliArgs {
#[arg(long)]
pub(crate) repo: Option<String>,
#[arg(long, value_name = "OWNER/REPO")]
pub(crate) from_upstream: Option<String>,
#[arg(long, default_value_t = 50)]
pub(crate) max_prs: usize,
#[arg(long = "pr", value_name = "NUMBER")]
pub(crate) pr_numbers: Vec<i32>,
#[arg(long = "exclude-prs", value_name = "CSV", value_delimiter = ',')]
pub(crate) exclude_prs: Vec<i32>,
#[arg(long)]
pub(crate) since: Option<String>,
#[arg(long)]
pub(crate) include_open: bool,
#[arg(long)]
pub(crate) upload: bool,
#[arg(long)]
pub(crate) dry_run: bool,
#[arg(long)]
pub(crate) json: bool,
}
#[derive(Args)]
pub(crate) struct InitCliArgs {
#[arg(long)]
pub(crate) check: bool,
}
#[derive(Args)]
pub(crate) struct RecallCliArgs {
pub(crate) intent: Option<String>,
#[arg(long, value_name = "PATH")]
pub(crate) file: Option<String>,
#[arg(long)]
pub(crate) diff: bool,
#[arg(long, default_value_t = 5)]
pub(crate) top_k: usize,
#[arg(long)]
pub(crate) json: bool,
#[arg(long)]
pub(crate) verbose: bool,
#[arg(long, conflicts_with = "json")]
pub(crate) copy: bool,
}