diff --git a/Actions/AL-Go-Helper.ps1 b/Actions/AL-Go-Helper.ps1 index 424ee0b0b..2549f6b18 100644 --- a/Actions/AL-Go-Helper.ps1 +++ b/Actions/AL-Go-Helper.ps1 @@ -1409,15 +1409,14 @@ function CommitFromNewFolder { } invoke-git push -u $serverUrl $branch try { - $prCreateCmd = "invoke-gh pr create --fill --title ""$title"" --head ""$branch"" --repo ""$env:GITHUB_REPOSITORY"" --base ""$ENV:GITHUB_REF_NAME"" --body ""$body""" if ($settings.commitOptions.pullRequestLabels) { $labels = "$($settings.commitOptions.pullRequestLabels -join ",")" Write-Host "Adding labels: $labels" - $prCreateCmd += " --label ""$labels""" + invoke-gh pr create --fill --head $branch --repo $env:GITHUB_REPOSITORY --base $ENV:GITHUB_REF_NAME --body "$body" --label $labels + } else { + invoke-gh pr create --fill --head $branch --repo $env:GITHUB_REPOSITORY --base $ENV:GITHUB_REF_NAME --body "$body" } - Invoke-Expression $prCreateCmd - if ($settings.commitOptions.pullRequestAutoMerge) { invoke-gh pr merge --auto --squash --delete-branch }