hive-forge: add body to pr show --json, error --json on six verbs that silently ignored it
This commit is contained in:
parent
48ac4ac423
commit
e0ad3a567b
6 changed files with 25 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
//! `view <number> [repo]` — dump title + body + all comments as
|
||||
//! markdown.
|
||||
|
||||
use anyhow::Result;
|
||||
use anyhow::{Result, bail};
|
||||
use clap::Args as ClapArgs;
|
||||
use forgejo_api::structs::{IssueGetCommentsQuery, StateType};
|
||||
|
||||
|
|
@ -16,6 +16,12 @@ pub struct Args {
|
|||
}
|
||||
|
||||
pub fn run(client: &Client, args: Args) -> Result<()> {
|
||||
if client.json_mode() {
|
||||
bail!(
|
||||
"hive-forge view: --json is not supported for this verb — \
|
||||
use `issue show`/`pr show` for structured fields"
|
||||
);
|
||||
}
|
||||
let repo = client.repo()?;
|
||||
// Reading the thread clears its unread notification so the
|
||||
// read-before-comment guard (in `comment`) lets a reply through.
|
||||
|
|
|
|||
Loading…
Reference in a new issue