Skip to content

Load yaml files using the failsafe schema option#226

Merged
crazy-max merged 2 commits intocrazy-max:masterfrom
pjpires:yaml-failsafe-schema
Jan 30, 2025
Merged

Load yaml files using the failsafe schema option#226
crazy-max merged 2 commits intocrazy-max:masterfrom
pjpires:yaml-failsafe-schema

Conversation

@pjpires
Copy link
Copy Markdown
Contributor

@pjpires pjpires commented Jan 28, 2025

This PR ensures we load the YAML file containing the labels declaration using the FAILSAFE_SCHEMA option from js-yaml (docs). This means only strings, arrays and plain objects can be present in the loaded document.

@crazy-max, I've added a new fixture file containing several examples to cover the different fields currently available. Please, let me know if you can think of additional examples that would be useful to include.

Fixes #221.

@pjpires pjpires requested a review from crazy-max as a code owner January 28, 2025 17:47
Copy link
Copy Markdown
Owner

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

@crazy-max crazy-max merged commit 98f4f2b into crazy-max:master Jan 30, 2025
@pjpires pjpires deleted the yaml-failsafe-schema branch January 30, 2025 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error running labeler

2 participants