fix(model): handle YAML map forms that caused unmarshall errors #3

Merged
k3nny merged 1 commits from fix/unmarshall_errors into main 2026-06-11 20:31:31 +02:00
Owner

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>
k3nny added 1 commit 2026-06-11 20:30:07 +02:00
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>
k3nny merged commit 8c3ce050f5 into main 2026-06-11 20:31:31 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: k3nny/glint#3