feat(resultdetail): show executor status by default
Some checks failed
submodules sync / sync (push) Failing after 2s
build / build (push) Successful in 1m29s
build / trigger-build-image (push) Successful in 10s

This commit is contained in:
张泊明518370910136 2024-10-22 06:59:56 -04:00
parent 469678e999
commit 2c045b8494
GPG Key ID: D47306D7062CDA9D

View File

@ -8,6 +8,7 @@ import (
type Conf struct {
Score int
ShowExecutorStatus bool `default:"true"`
ShowExitStatus bool `default:"false"`
ShowError bool `default:"false"`
ShowTime bool `default:"true"`
@ -29,6 +30,9 @@ func (*ResultDetail) Run(results []stage.ExecutorResult, confAny any) (
var res []stage.ParserResult
for _, result := range results {
comment := ""
if conf.ShowExecutorStatus {
comment += fmt.Sprintf("Executor Status: `%s`\n", result.Status.String())
}
if conf.ShowExitStatus {
comment += fmt.Sprintf("Exit Status: `%d`\n", result.ExitStatus)
}