From 2c045b8494ba493bda606b70783d1fec5b120dc1 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Tue, 22 Oct 2024 06:59:56 -0400 Subject: [PATCH] feat(resultdetail): show executor status by default --- internal/parser/resultdetail/parser.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/internal/parser/resultdetail/parser.go b/internal/parser/resultdetail/parser.go index eb15bb1..3678164 100644 --- a/internal/parser/resultdetail/parser.go +++ b/internal/parser/resultdetail/parser.go @@ -7,13 +7,14 @@ import ( ) type Conf struct { - Score int - ShowExitStatus bool `default:"false"` - ShowError bool `default:"false"` - ShowTime bool `default:"true"` - ShowMemory bool `default:"true"` - ShowRunTime bool `default:"false"` - ShowFiles []string + Score int + ShowExecutorStatus bool `default:"true"` + ShowExitStatus bool `default:"false"` + ShowError bool `default:"false"` + ShowTime bool `default:"true"` + ShowMemory bool `default:"true"` + ShowRunTime bool `default:"false"` + ShowFiles []string } type ResultDetail struct{} @@ -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) }