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