diff --git a/Tools/YamlCreate.ps1 b/Tools/YamlCreate.ps1 index 0e47ec6394c54..1ed577a413c01 100644 --- a/Tools/YamlCreate.ps1 +++ b/Tools/YamlCreate.ps1 @@ -882,8 +882,8 @@ Function Enter-PR-Parameters { } switch ( KeypressMenu -Prompt $_menu["Prompt"] -Entries $_menu["Entries"] -DefaultString $_menu["DefaultString"] -HelpText $_menu["HelpText"]) { - 'Y' { $PrBodyContentReply += $_line.Replace("[ ]", "[X]"), "`n" } - default { $PrBodyContentReply += $_line, "`n" } + 'Y' { $PrBodyContentReply += @($_line.Replace("[ ]", "[X]")) } + default { $PrBodyContentReply += @($_line) } } } @@ -896,14 +896,14 @@ Function Enter-PR-Parameters { } switch ( KeypressMenu -Prompt $_menu["Prompt"] -Entries $_menu["Entries"] -DefaultString $_menu["DefaultString"] -HelpText $_menu["HelpText"]) { - 'Y' { $PrBodyContentReply += $_line.Replace("[ ]", "[X]"), "`n" } - default { $PrBodyContentReply += $_line, "`n" } + 'Y' { $PrBodyContentReply += @($_line.Replace("[ ]", "[X]")) } + default { $PrBodyContentReply += @($_line) } } } '*winget validate*' { if ($?) { - $PrBodyContentReply += $_line.Replace("[ ]", "[X]"), "`n" + $PrBodyContentReply += @($_line.Replace("[ ]", "[X]")) } else { $_menu = @{ @@ -915,15 +915,15 @@ Function Enter-PR-Parameters { } switch ( KeypressMenu -Prompt $_menu["Prompt"] -Entries $_menu["Entries"] -DefaultString $_menu["DefaultString"] -HelpText $_menu["HelpText"] -HelpTextColor $_menu["HelpTextColor"]) { - 'Y' { $PrBodyContentReply += $_line.Replace("[ ]", "[X]"), "`n" } - default { $PrBodyContentReply += $_line, "`n" } + 'Y' { $PrBodyContentReply += @($_line.Replace("[ ]", "[X]")) } + default { $PrBodyContentReply += @($_line) } } } } '*tested your manifest*' { if ($script:SandboxTest -eq '0') { - $PrBodyContentReply += $_line.Replace("[ ]", "[X]"), "`n" + $PrBodyContentReply += @($_line.Replace("[ ]", "[X]")) } else { $_menu = @{ @@ -934,8 +934,8 @@ Function Enter-PR-Parameters { } switch ( KeypressMenu -Prompt $_menu["Prompt"] -Entries $_menu["Entries"] -DefaultString $_menu["DefaultString"] -HelpText $_menu["HelpText"]) { - 'Y' { $PrBodyContentReply += $_line.Replace("[ ]", "[X]"), "`n" } - default { $PrBodyContentReply += $_line, "`n" } + 'Y' { $PrBodyContentReply += @($_line.Replace("[ ]", "[X]")) } + default { $PrBodyContentReply += @($_line) } } } } @@ -949,8 +949,8 @@ Function Enter-PR-Parameters { } switch ( KeypressMenu -Prompt $_menu["Prompt"] -Entries $_menu["Entries"] -DefaultString $_menu["DefaultString"] -HelpText $_menu["HelpText"]) { - 'Y' { $PrBodyContentReply += $_line.Replace("[ ]", "[X]"), "`n" } - default { $PrBodyContentReply += $_line, "`n" } + 'Y' { $PrBodyContentReply += @($_line.Replace("[ ]", "[X]")) } + default { $PrBodyContentReply += @($_line) } } } @@ -962,8 +962,8 @@ Function Enter-PR-Parameters { } switch ( KeypressMenu -Prompt $_menu["Prompt"] -Entries $_menu["Entries"] -DefaultString $_menu["DefaultString"]) { - 'Y' { $PrBodyContentReply += $_line.Replace("[ ]", "[X]"), "`n" } - default { $PrBodyContentReply += $_line, "`n" } + 'Y' { $PrBodyContentReply += @($_line.Replace("[ ]", "[X]")) } + default { $PrBodyContentReply += @($_line) } } } } @@ -980,14 +980,14 @@ Function Enter-PR-Parameters { Write-Host Write-Host "Enter issue number. For example`: 21983, 43509" $ResolvedIssues = Read-Host -Prompt 'Resolved Issues' + $PrBodyContentReply += @("") Foreach ($i in ($ResolvedIssues.Split(",").Trim())) { - $PrBodyContentReply += "Resolves #$i`n" + $PrBodyContentReply += @("Resolves #$i") } } default { Write-Host } } - $PrBodyContentReply = ($PrBodyContentReply.Trim() -ne '') Set-Content -Path PrBodyFile -Value $PrBodyContentReply | Out-Null gh pr create --body-file PrBodyFile -f Remove-Item PrBodyFile