From c0e0618ec0acce739be2fbf4a9d9ee8def809973 Mon Sep 17 00:00:00 2001 From: Sebastian Kuzminsky Date: Tue, 8 Jul 2025 17:31:10 -0600 Subject: [PATCH] ent list: show assignee, if any --- src/bin/ent/main.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/bin/ent/main.rs b/src/bin/ent/main.rs index 7526e44..999d949 100644 --- a/src/bin/ent/main.rs +++ b/src/bin/ent/main.rs @@ -97,12 +97,15 @@ fn handle_command(args: &Args, issues_dir: &std::path::Path) -> anyhow::Result<( println!("{:?}:", state); for uuid in these_uuids { let issue = issues.issues.get(*uuid).unwrap(); - let num_comments = issue.comments.len(); - if num_comments == 0 { - println!("{} {}", uuid, issue.title()); - } else { - println!("{} 🗩 {} {}", uuid, num_comments, issue.title()); - } + let comments = match issue.comments.len() { + 0 => String::from(" "), + n => format!("🗩 {}", n), + }; + let assignee = match &issue.assignee { + Some(assignee) => format!(" (👉 {})", assignee), + None => String::from(""), + }; + println!("{} {} {}{}", uuid, comments, issue.title(), assignee); } println!(""); }