Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Boolean false value on inputs breaks configuration syntax #1529

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

ANGkeith
Copy link
Collaborator

closes #1528

src/parser.ts Outdated
Comment on lines 412 to 413
const inputValue = inputs[interpolationKey]
?? inputsSpecification.spec.inputs[interpolationKey]?.default;
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
const inputValue = inputs[interpolationKey]
?? inputsSpecification.spec.inputs[interpolationKey]?.default;
const inputValue = inputs[interpolationKey] ?? inputsSpecification.spec.inputs[interpolationKey]?.default;

Copy link
Collaborator Author

@ANGkeith ANGkeith Mar 19, 2025

Choose a reason for hiding this comment

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

i see you prefer this syntax,

so added 867c457

to enforce it

Copy link
Owner

Choose a reason for hiding this comment

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

I ❤️ you 😄

Comment on lines +257 to +267
const expected = `---
stages:
- .pre
- test
- .post
scan-website:
script:
- echo false`;

expect(writeStreams.stdoutLines[0]).toEqual(expected);
});
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
const expected = `---
stages:
- .pre
- test
- .post
scan-website:
script:
- echo false`;
expect(writeStreams.stdoutLines[0]).toEqual(expected);
});
const expected = [
"---",
"stages:",
" - .pre",
" - test",
" - .post",
"scan-website:",
" script:",
" - echo false",
];
expect(writeStreams.stdoutLines[0]).toEqual(expected.join("\n"));
});

Copy link
Collaborator Author

@ANGkeith ANGkeith Mar 19, 2025

Choose a reason for hiding this comment

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

I have been doing the backticks versions in multiple places...

personally i prefer the backticks version because for ease of (typing/copy pasting)...

what's your perspective in this ?

Copy link
Owner

Choose a reason for hiding this comment

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

I don't prefer the weird indentation or backticks, but I can live with both 😄

@ANGkeith ANGkeith merged commit 0574e6d into master Mar 20, 2025
11 checks passed
@ANGkeith ANGkeith deleted the fix/#1528 branch March 20, 2025 13:53
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.

Boolean false value on inputs breaks configuration syntax
2 participants