hive-forge: assign accepts [repo] override (argus@#407)
This commit is contained in:
parent
595e3c040c
commit
76cf2ffd36
1 changed files with 3 additions and 1 deletions
|
|
@ -19,10 +19,12 @@ pub struct Args {
|
||||||
/// Remove the user instead of adding.
|
/// Remove the user instead of adding.
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
remove: bool,
|
remove: bool,
|
||||||
|
/// Repo override.
|
||||||
|
repo: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn run(client: &Client, args: Args) -> Result<()> {
|
pub fn run(client: &Client, args: Args) -> Result<()> {
|
||||||
let repo = client.repo(None);
|
let repo = client.repo(args.repo.as_deref());
|
||||||
let current = client.get_json(&format!("/repos/{repo}/issues/{}", args.number))?;
|
let current = client.get_json(&format!("/repos/{repo}/issues/{}", args.number))?;
|
||||||
let mut assignees: Vec<String> = current
|
let mut assignees: Vec<String> = current
|
||||||
.get("assignees")
|
.get("assignees")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue