Skip to content

Escape single quotes correctly in YAML CI writers#493

Merged
ITaluone merged 3 commits into
Fallout-build:mainfrom
YousifSala7:bugfix/yaml-single-quote-483
Jul 15, 2026
Merged

Escape single quotes correctly in YAML CI writers#493
ITaluone merged 3 commits into
Fallout-build:mainfrom
YousifSala7:bugfix/yaml-single-quote-483

Conversation

@YousifSala7

Copy link
Copy Markdown
Contributor

Fixes #483

Description:
This PR updates the YAML CI writers to use SingleQuoteYaml() instead of SingleQuote(), ensuring that embedded apostrophes are properly escaped by doubling the quote (e.g., '') rather than using a backslash \' which results in invalid YAML.

Changes:

  • Migrated all requested call sites in GitHubActions and AzurePipelines configuration files to SingleQuoteYaml().
  • Addressed the pre-existing quirk in AzurePipelinesJob.cs (vmImage). Removed the double wrapping (.SingleQuote().SingleQuote()) and replaced it with a single SingleQuoteYaml() call, which produces the correct intended output.
  • Left the non-YAML SingleQuote() callers unchanged as requested.
  • Added regression specs in AzurePipelinesJobSpecs and GitHubActionsArtifactStepSpecs to verify apostrophe escaping and correct vmImage rendering without snapshot churn.

@YousifSala7
YousifSala7 requested a review from a team as a code owner July 15, 2026 12:23

@ITaluone ITaluone left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for contributing this!

only this little nitpick :)

Comment thread tests/Fallout.Common.Specs/CI/AzurePipelinesJobSpecs.cs Outdated

@avidenic avidenic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good work, only a small nitpick suggestion.

Comment thread tests/Fallout.Common.Specs/CI/GitHubActionsArtifactStepSpecs.cs Outdated
@ITaluone ITaluone added bug Something isn't working target/vCurrent Targets the current version labels Jul 15, 2026
@ITaluone
ITaluone enabled auto-merge (rebase) July 15, 2026 13:44
@ITaluone
ITaluone merged commit c503892 into Fallout-build:main Jul 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working target/vCurrent Targets the current version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI writers emit YAML names via SingleQuote(), which backslash-escapes (invalid YAML for embedded quotes)

3 participants