Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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")
Expand Down Expand Up @@ -219,12 +225,13 @@ async fn main() -> Result<(), Box<dyn Error>> {
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() {
Expand Down