@@ -474,27 +474,17 @@ func displayTableStats(stats *StatsCollector) {
474
474
return bold + color + s + reset
475
475
}
476
476
477
- head := fmt .Sprintf ("│ %-*s │ %*s │ %-*s │ %-*s │" ,
478
- repoCol , colorizeBold ("Repository" , blue ),
479
- colWidths [1 ], colorizeBold ("PRs Combined" , blue ),
480
- colWidths [2 ], colorizeBold ("Skipped" , blue ),
481
- colWidths [3 ], colorizeBold ("Status" , blue ),
482
- )
483
- // Fix header pipe padding: ensure each header cell is padded to match the body
484
- headRunes := []rune (head )
485
- // Replace single spaces before and after pipes with nothing, then add a single space after each pipe
486
- headFixed := ""
487
- for i := 0 ; i < len (headRunes ); i ++ {
488
- headFixed += string (headRunes [i ])
489
- if headRunes [i ] == '│' && i + 1 < len (headRunes ) && headRunes [i + 1 ] != ' ' {
490
- headFixed += " "
491
- }
477
+ // Build header row with correct alignment and color, matching body formatting
478
+ headCells := []string {
479
+ fmt .Sprintf ("%-*s" , repoCol , colorizeBold ("Repository" , blue )),
480
+ fmt .Sprintf ("%*s" , colWidths [1 ], colorizeBold ("PRs Combined" , blue )),
481
+ fmt .Sprintf ("%-*s" , colWidths [2 ], colorizeBold ("Skipped" , blue )),
482
+ fmt .Sprintf ("%-*s" , colWidths [3 ], colorizeBold ("Status" , blue )),
492
483
}
493
- // Remove any double spaces
494
- headFixed = strings .ReplaceAll (headFixed , " " , " " )
484
+ head := "│ " + strings .Join (headCells , " │ " ) + " │"
495
485
496
486
fmt .Println (top )
497
- fmt .Println (headFixed )
487
+ fmt .Println (head )
498
488
fmt .Println (sep )
499
489
500
490
for _ , repoStat := range stats .PerRepoStats {
0 commit comments