diff --git a/pkg/exprparser/interpreter.go b/pkg/exprparser/interpreter.go index 342cdcba109..5df849c7b5a 100644 --- a/pkg/exprparser/interpreter.go +++ b/pkg/exprparser/interpreter.go @@ -368,7 +368,7 @@ func (impl *interperterImpl) compareValues(leftValue reflect.Value, rightValue r case reflect.Invalid: if rightValue.Kind() == reflect.Invalid { - return false, nil + return true, nil } // not possible situation - params are converted to the same type in code above diff --git a/pkg/exprparser/interpreter_test.go b/pkg/exprparser/interpreter_test.go index 9b4552468ce..01eb25f4126 100644 --- a/pkg/exprparser/interpreter_test.go +++ b/pkg/exprparser/interpreter_test.go @@ -72,7 +72,7 @@ func TestOperators(t *testing.T) { {"github.event.commits[0].author.username != github.event.commits[1].author.username", true, "property-comparison1", ""}, {"github.event.commits[0].author.username1 != github.event.commits[1].author.username", true, "property-comparison2", ""}, {"github.event.commits[0].author.username != github.event.commits[1].author.username1", true, "property-comparison3", ""}, - {"github.event.commits[0].author.username1 != github.event.commits[1].author.username2", false, "property-comparison4", ""}, + {"github.event.commits[0].author.username1 != github.event.commits[1].author.username2", true, "property-comparison4", ""}, {"secrets != env", nil, "property-comparison5", "Compare not implemented for types: left: map, right: map"}, }