feat(parser/resultstatus): conf force quit on not accepted
Some checks failed
submodules sync / sync (push) Successful in 42s
build / build (push) Failing after 1m40s
build / trigger-build-image (push) Has been skipped

This commit is contained in:
张泊明518370910136 2024-11-01 18:39:36 -04:00
parent fc86f93dc9
commit fa649fcabe
GPG Key ID: D47306D7062CDA9D

View File

@ -8,8 +8,9 @@ import (
) )
type Conf struct { type Conf struct {
Score int Score int
Comment string Comment string
ForceQuitOnNotAccepted bool `default:"false"`
} }
type ResultStatus struct{} type ResultStatus struct{}
@ -31,7 +32,9 @@ func (*ResultStatus) Run(results []stage.ExecutorResult, confAny any) (
comment = fmt.Sprintf( comment = fmt.Sprintf(
"Unexpected executor status: %s.", result.Status, "Unexpected executor status: %s.", result.Status,
) )
forceQuit = true if conf.ForceQuitOnNotAccepted {
forceQuit = true
}
} }
res = append(res, stage.ParserResult{ res = append(res, stage.ParserResult{
Score: score, Score: score,