mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-16 18:01:34 +00:00
feat: added support for dereferenced map properties (#821)
Refs https://github.com/nektos/act/pull/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> (cherry picked from commit 20bb25432dd8db44c689a3bc2d440a648e71b3bb) <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - features - [PR](https://code.forgejo.org/forgejo/runner/pulls/821): <!--number 821 --><!--line 0 --><!--description ZmVhdDogYWRkZWQgc3VwcG9ydCBmb3IgZGVyZWZlcmVuY2VkIG1hcCBwcm9wZXJ0aWVz-->feat: added support for dereferenced map properties<!--description--> <!--end release-notes-assistant--> Co-authored-by: m1r4c <lars-github.com@domesjo.com> Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/821 Reviewed-by: Gusted <gusted@noreply.code.forgejo.org> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
parent
3ef94e3b41
commit
931c2c0ac3
3 changed files with 63 additions and 1 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue