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
|
|
@ -22,13 +22,11 @@ pub struct Args {
|
|||
/// Initial assignee login.
|
||||
#[arg(long)]
|
||||
assignee: Option<String>,
|
||||
/// Repo override.
|
||||
repo: Option<String>,
|
||||
}
|
||||
|
||||
pub fn run(client: &Client, args: Args) -> Result<()> {
|
||||
let body = body::resolve(args.body.as_deref(), args.body_file.as_deref())?.unwrap_or_default();
|
||||
let repo = client.repo(args.repo.as_deref());
|
||||
let repo = client.repo();
|
||||
let mut payload = json!({ "title": args.title, "body": body });
|
||||
if let Some(a) = args.assignee {
|
||||
payload["assignees"] = json!([a]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue