hive-forge: add pr edit, reusing issue edit's shared /issues endpoint
This commit is contained in:
parent
aa149a7a62
commit
8db1cbd204
4 changed files with 19 additions and 8 deletions
|
|
@ -1,6 +1,9 @@
|
|||
//! `issue-edit <number> [--title <t>] [body sources] [--state s]
|
||||
//! [--milestone id] [repo]` — partial update of an issue. Fields not
|
||||
//! provided are left unchanged.
|
||||
//! provided are left unchanged. Also backs `pr edit`: Forgejo serves
|
||||
//! both kinds off the same `/issues/<n>` endpoint, so this is shared
|
||||
//! as-is — `pr_cmd.rs` wires it in with a `Kind::Pr` check, the same
|
||||
//! pattern `close`/`reopen`/`labels` already use.
|
||||
|
||||
use anyhow::Result;
|
||||
use clap::{Args as ClapArgs, ValueEnum};
|
||||
|
|
@ -28,8 +31,8 @@ impl StateArg {
|
|||
|
||||
#[derive(ClapArgs)]
|
||||
pub struct Args {
|
||||
/// Issue number.
|
||||
number: u64,
|
||||
/// Issue (or PR — shares the same `/issues/<n>` endpoint) number.
|
||||
pub(crate) number: u64,
|
||||
/// New title (omit to leave unchanged).
|
||||
#[arg(long)]
|
||||
title: Option<String>,
|
||||
|
|
|
|||
Loading…
Reference in a new issue