fix(model): handle YAML map forms that caused unmarshall errors #3
Reference in New Issue
Block a user
Delete Branch "fix/unmarshall_errors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Variables with value/description/options sub-keys, default.image in map
form, default.before_script / default.after_script as block scalars, and
rules.changes / rules.exists in {paths, compare_to} map form all caused
"yaml: cannot unmarshal !!map into string" because the struct fields were
typed too narrowly.
Changed types in model.Pipeline, model.DefaultConfig, and model.Rule to
accept any to match GitLab CI spec flexibility (13.7+ variable declarations,
15.3+ rules.changes map form, image map form in default block).
Adds testdata/script_multiline.yml covering all these patterns.
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Variables with value/description/options sub-keys, default.image in map form, default.before_script / default.after_script as block scalars, and rules.changes / rules.exists in {paths, compare_to} map form all caused "yaml: cannot unmarshal !!map into string" because the struct fields were typed too narrowly. Changed types in model.Pipeline, model.DefaultConfig, and model.Rule to accept any to match GitLab CI spec flexibility (13.7+ variable declarations, 15.3+ rules.changes map form, image map form in default block). Adds testdata/script_multiline.yml covering all these patterns. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>