hive-forge: global -r/--repo flag instead of per-verb [repo] positional (mara@#407)
This commit is contained in:
parent
76cf2ffd36
commit
badf21714b
21 changed files with 46 additions and 85 deletions
|
|
@ -44,8 +44,6 @@ pub struct Args {
|
|||
/// Milestone id (0 to unset).
|
||||
#[arg(long)]
|
||||
milestone: Option<u64>,
|
||||
/// Repo override.
|
||||
repo: Option<String>,
|
||||
}
|
||||
|
||||
pub fn run(client: &Client, args: Args) -> Result<()> {
|
||||
|
|
@ -73,7 +71,7 @@ pub fn run(client: &Client, args: Args) -> Result<()> {
|
|||
payload.insert("milestone".into(), Value::Number(m.into()));
|
||||
}
|
||||
|
||||
let repo = client.repo(args.repo.as_deref());
|
||||
let repo = client.repo();
|
||||
let resp = client.patch_json(
|
||||
&format!("/repos/{repo}/issues/{}", args.number),
|
||||
&Value::Object(payload),
|
||||
|
|
|
|||
Loading…
Reference in a new issue