Change primary arguments

Owner and repo are combined into one string the same way Go dependencies or GitHub Actions are named. `<owner>/<repo>`

Each will be fetched from a matching environment variable if not specified on the command line.
This commit is contained in:
2025-05-24 19:33:21 -05:00
parent 1210b168ee
commit 6b409c56d4

View File

@@ -3,10 +3,10 @@ use clap::{Parser, Subcommand};
#[derive(Debug, Parser)]
#[command(version, about, long_about = None)]
pub struct Args {
#[arg(short = 'o', long = "owner", env = "GTTOOL_OWNER")]
pub owner: String,
#[arg(short = 'r', long = "repo")]
pub repo: Option<String>,
#[arg(short = 'u', long = "url", env = "GTTOOL_GITEA_URL")]
pub gitea_url: String,
#[arg(short = 'r', long = "repo", env = "GTTOOL_FQRN")]
pub repo: String,
#[command(subcommand)]
pub command: Commands,