refactor: default empty if: statement to if: success() in evaluator & remove FixIfStatement()
(#990)
* refactor: default empty `if:` statement to `if: success()` in evaluator Previously the code to default an empty `if:` statement in the yaml file was implemented in different files in the model package. Now an empty `if:` statement defaults to `success()` in the expression evaluator. * refactor: remove obsolete `FixIfStatement` functions The introduction of the expression evaluator seems to have made these functions obsolete, as the test case `TestRunEvent/issue-598` works even without these functions. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
@@ -90,12 +90,5 @@ func ReadAction(in io.Reader) (*Action, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for i := range a.Runs.Steps {
|
||||
step := &a.Runs.Steps[i]
|
||||
if step.If.Value == "" {
|
||||
step.If.Value = "success()"
|
||||
}
|
||||
}
|
||||
|
||||
return a, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user