From b201206c8bc3337480aa203568cdb599289eb9f2 Mon Sep 17 00:00:00 2001 From: Cyborus Date: Sun, 3 Nov 2024 23:12:54 -0500 Subject: feat: don't show empty base branch name i.e. agit prs don't have a base branch, so the title is empty. looks better to not display that --- src/prs.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/prs.rs b/src/prs.rs index 38e31ff..af7857f 100644 --- a/src/prs.rs +++ b/src/prs.rs @@ -528,7 +528,11 @@ pub async fn view_pr(repo: &RepoName, api: &Forgejo, id: Option) -> eyre::R println!( "By {white}{username}{reset} {dash} {state} {dash} {bright_green}+{additions} {bright_red}-{deletions}{reset}" ); - println!("From `{head_name}` into `{base_name}`"); + if head_name.is_empty() { + println!("Into `{base_name}`"); + } else { + println!("From `{head_name}` into `{base_name}`"); + } if let Some(body) = &pr.body { if !body.trim().is_empty() { -- cgit v1.2.3