feat(cmd/joj3): show keyword only on non-empty keyword
Some checks failed
build / build (push) Failing after 4s
build / trigger-build-image (push) Has been skipped
submodules sync / sync (push) Successful in 29s

This commit is contained in:
张泊明518370910136 2024-11-27 01:49:43 -05:00
parent 5d7be878e1
commit d2c53205ac
GPG Key ID: D47306D7062CDA9D

View File

@ -141,9 +141,11 @@ func newTeapotCheckStageResults(
comment := "" comment := ""
forceQuit := false forceQuit := false
for _, checkResult := range checkResults { for _, checkResult := range checkResults {
if checkResult.Name != "" {
comment += fmt.Sprintf("keyword `%s` ", checkResult.Name)
}
comment += fmt.Sprintf( comment += fmt.Sprintf(
"keyword `%s` in last %d hour(s): submit count %d, max count %d\n", "in last %d hour(s): submit count %d, max count %d\n",
checkResult.Name,
checkResult.TimePeriod, checkResult.TimePeriod,
checkResult.SubmitCount, checkResult.SubmitCount,
checkResult.MaxCount, checkResult.MaxCount,