hive-forge: show/pr show now list current dependencies
This commit is contained in:
parent
7bad72d354
commit
29a11476a4
3 changed files with 34 additions and 3 deletions
|
|
@ -5,7 +5,7 @@ use clap::Args as ClapArgs;
|
|||
use serde_json::json;
|
||||
|
||||
use crate::client::{Client, index};
|
||||
use crate::verbs::print_json;
|
||||
use crate::verbs::{dependency_summaries, print_json};
|
||||
|
||||
#[derive(ClapArgs)]
|
||||
pub struct Args {
|
||||
|
|
@ -19,6 +19,7 @@ pub fn run(client: &Client, args: Args) -> Result<()> {
|
|||
.api()
|
||||
.repo_get_pull_request(owner, name, index(args.number)?)
|
||||
.send()?;
|
||||
let dependencies = dependency_summaries(client, owner, name, args.number)?;
|
||||
let trimmed = json!({
|
||||
"number": pull.number,
|
||||
"title": pull.title,
|
||||
|
|
@ -28,6 +29,7 @@ pub fn run(client: &Client, args: Args) -> Result<()> {
|
|||
"head_sha": pull.head.as_ref().and_then(|h| h.sha.as_deref()),
|
||||
"head_branch": pull.head.as_ref().and_then(|h| h.label.as_deref()),
|
||||
"base_branch": pull.base.as_ref().and_then(|b| b.label.as_deref()),
|
||||
"dependencies": dependencies,
|
||||
});
|
||||
print_json(&trimmed)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue