Added support for dereferenced map properties (#2635)

* Added support for dereferenced properties

* Added negative test

* Update pkg/exprparser/functions_test.go

Co-authored-by: ChristopherHX <christopher.homberger@web.de>

* Update pkg/exprparser/functions_test.go

Co-authored-by: ChristopherHX <christopher.homberger@web.de>

* fix lint

---------

Co-authored-by: m1r4c <lars-github@domesjo.com>
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
This commit is contained in:
m1r4c
2025-01-31 20:14:24 +01:00
committed by GitHub
parent 7c45ad68cb
commit 9dd0854a67
3 changed files with 67 additions and 0 deletions

View File

@@ -562,6 +562,8 @@ func TestContexts(t *testing.T) {
{"matrix.os", "Linux", "matrix-context"},
{"needs.job-id.outputs.output-name", "value", "needs-context"},
{"needs.job-id.result", "success", "needs-context"},
{"contains(needs.*.result, 'success')", true, "needs-wildcard-context-contains-success"},
{"contains(needs.*.result, 'failure')", false, "needs-wildcard-context-contains-failure"},
{"inputs.name", "value", "inputs-context"},
}
@@ -610,6 +612,12 @@ func TestContexts(t *testing.T) {
},
Result: "success",
},
"another-job-id": {
Outputs: map[string]string{
"output-name": "value",
},
Result: "success",
},
},
Inputs: map[string]interface{}{
"name": "value",