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
1 changed files with 25 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
//! `tree-sha <ref> [repo]` — print the tree SHA of the commit at a
|
||||
//! branch name or commit SHA.
|
||||
|
||||
use anyhow::Result;
|
||||
use anyhow::{Result, bail};
|
||||
use clap::Args as ClapArgs;
|
||||
use forgejo_api::structs::RepoGetSingleCommitQuery;
|
||||
|
||||
|
|
@ -14,6 +14,9 @@ pub struct Args {
|
|||
}
|
||||
|
||||
pub fn run(client: &Client, args: Args) -> Result<()> {
|
||||
if client.json_mode() {
|
||||
bail!("hive-forge tree-sha: --json is not supported for this verb, only the plain sha");
|
||||
}
|
||||
let (owner, name) = client.owner_repo()?;
|
||||
// Try branch first; the bash helper silently treats failure as
|
||||
// "not a branch, use the reference as a commit sha directly".
|
||||
|
|
|
|||
Loading…
Reference in a new issue