Skip to content

Commit

Permalink
Fix review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-savchuk committed Mar 1, 2023
1 parent 7baa65b commit 9de011a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/exprparser/interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/exprparser/interpreter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
}

Expand Down

0 comments on commit 9de011a

Please sign in to comment.