From 915cf7a044bb14e3a6cccb18e508af022fdac508 Mon Sep 17 00:00:00 2001 From: Luis Ball Date: Mon, 29 Dec 2025 00:47:52 -0800 Subject: [PATCH] feat: add --badges flag to annotate command - Add --badges CLI flag to enable shields.io status badges - Default behavior now generates simpler table without badges - Works with private repositories by default --- src/main.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index f27eb6e..4ae6787 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,6 +41,11 @@ fn clap<'a, 'b>() -> App<'a, 'b> { .takes_value(true) .help("PR title prefix identifier to remove from the title"); + let badges = Arg::with_name("badges") + .long("badges") + .takes_value(false) + .help("Use shields.io badges for PR status (requires public repo visibility)"); + let annotate = SubCommand::with_name("annotate") .about("Annotate the descriptions of all PRs in a stack with metadata about all PRs in the stack") .setting(AppSettings::ArgRequiredElseHelp) @@ -49,6 +54,7 @@ fn clap<'a, 'b>() -> App<'a, 'b> { .arg(repository.clone()) .arg(ci.clone()) .arg(prefix.clone()) + .arg(badges.clone()) .arg(Arg::with_name("prelude") .long("prelude") .short("p") @@ -219,12 +225,13 @@ async fn main() -> Result<(), Box> { build_pr_stack_for_repo(&identifier, repository, &credentials, get_excluded(m)) .await?; + let use_badges = m.is_present("badges"); let table = markdown::build_table( &stack, &identifier, m.value_of("prelude"), repository, - false, + use_badges, ); for (pr, _) in stack.iter() {