Skip to content

Commit 74940bc

Browse files
committed
alternate display
1 parent c0a8cfa commit 74940bc

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

internal/cmd/root.go

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -532,20 +532,37 @@ func displayTableStats(stats *StatsCollector) {
532532
}
533533
fmt.Println(bot)
534534

535-
// Print summary row
536-
fmt.Printf("\nSummary: Processed %d repos | Combined: %d | Skipped (MC): %d | Skipped (DNM): %d | Time: %s\n",
535+
// Print summary mini-table
536+
summaryTop := "╭───────────────┬───────────┬──────────────┬──────────────┬──────────────╮"
537+
summaryHead := "│ Repos │ Combined │ Skipped (MC) │ Skipped (DNM)│ Time │"
538+
summarySep := "├──────────────┼───────────┼──────────────┼──────────────┼──────────────┤"
539+
summaryRow := fmt.Sprintf(
540+
"│ %-11d │ %-9d │ %-12d │ %-12d │ %-12s │",
537541
stats.ReposProcessed,
538542
stats.PRsCombined,
539543
stats.PRsSkippedMergeConflict,
540544
stats.PRsSkippedCriteria,
541545
stats.EndTime.Sub(stats.StartTime).Round(time.Second),
542546
)
543-
544-
// Print PR links block
547+
summaryBot := "╰──────────────┴───────────┴──────────────┴──────────────┴──────────────╯"
548+
fmt.Println()
549+
fmt.Println(summaryTop)
550+
fmt.Println(summaryHead)
551+
fmt.Println(summarySep)
552+
fmt.Println(summaryRow)
553+
fmt.Println(summaryBot)
554+
555+
// Print PR links block (blue color)
545556
if len(stats.CombinedPRLinks) > 0 {
557+
blue := "\033[34m"
558+
reset := "\033[0m"
546559
fmt.Println("\nLinks to Combined PRs:")
547560
for _, link := range stats.CombinedPRLinks {
548-
fmt.Println("-", link)
561+
if noColor {
562+
fmt.Println("-", link)
563+
} else {
564+
fmt.Printf("- %s%s%s\n", blue, link, reset)
565+
}
549566
}
550567
}
551568
}

0 commit comments

Comments
 (0)