1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-10-15 19:42:06 +00:00
forgejo-runner/act/jobparser
Earl Warren 6e4a3b5127 fix: jobparser: do not crash on invalid workflow_{dispatch,call} (#193)
An invalid workflow_{dispatch,call} key with a type that is not a map may attempt to use a nil map. It happens randomly as the order of the key maps is not guaranteed. Without this fix, the tests will fail 100% of the time with:

`go test -count=500 -run=TestParseRawOn/on:___workflow_ -v ./pkg/jobparser/`

Regression from https://code.forgejo.org/forgejo/act/pulls/45

Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/193
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-25 11:30:48 +00:00
..
testdata chore(tests): fix invalid jobparser tests 2025-07-11 14:12:22 +02:00
evaluator.go Add custom enhancements 2022-11-22 14:16:35 +08:00
interpeter.go Make runs-on support variable expression (#91) 2024-03-01 04:29:58 +00:00
jobparser.go feat!: add the validate argument to reading workflows (#180) 2025-07-16 08:46:36 +00:00
jobparser_test.go feat!: add the validate argument to reading workflows (#180) 2025-07-16 08:46:36 +00:00
model.go fix: jobparser: do not crash on invalid workflow_{dispatch,call} (#193) 2025-07-25 11:30:48 +00:00
model_test.go fix: jobparser: do not crash on invalid workflow_{dispatch,call} (#193) 2025-07-25 11:30:48 +00:00
testdata_test.go Expose SetJob to make EraseNeeds work (#35) 2023-03-29 13:57:29 +08:00