From e0bf3a9ff77a93980ed504c545153e24d76f30d6 Mon Sep 17 00:00:00 2001 From: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com> Date: Tue, 20 Jan 2026 14:35:37 +0100 Subject: [PATCH 1/6] Add option to rerun workflows in WaitWorkflow function --- e2eTests/e2eTestHelper.psm1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/e2eTests/e2eTestHelper.psm1 b/e2eTests/e2eTestHelper.psm1 index e3bdaefe7..1d0548738 100644 --- a/e2eTests/e2eTestHelper.psm1 +++ b/e2eTests/e2eTestHelper.psm1 @@ -272,7 +272,8 @@ function WaitWorkflow { [string] $repository, [string] $runid, [switch] $noDelay, - [switch] $noError + [switch] $noError, + [switch] $noRerun ) $delay = !$noDelay.IsPresent @@ -301,6 +302,11 @@ function WaitWorkflow { Write-Host "Workflow conclusion: $($run.conclusion)" if ($run.conclusion -ne "Success" -and $run.conclusion -ne "cancelled") { + if (-not $noRerun.IsPresent) { + Write-Host "::Warning::Rerunning workflow: $($run.name) run $($run.id), conclusion $($run.conclusion), url = $($run.html_url)" + gh api --method POST /repos/$repository/actions/runs/$runid/rerun | Out-Null + WaitWorkflow -repository $repository -runid $runid -noDelay:$noDelay -noError:$noError -noRerun + } if (-not $noError.IsPresent) { throw "Workflow $($run.name), conclusion $($run.conclusion), url = $($run.html_url)" } } } From 91a0a3b07f913da6d17387ca0ef9f78cea48dc93 Mon Sep 17 00:00:00 2001 From: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com> Date: Wed, 21 Jan 2026 16:12:11 +0100 Subject: [PATCH 2/6] Return PR URL after creating pull request during AL-Go deployment --- Internal/Deploy.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Internal/Deploy.ps1 b/Internal/Deploy.ps1 index 84ca0b8f8..8200f5504 100644 --- a/Internal/Deploy.ps1 +++ b/Internal/Deploy.ps1 @@ -38,7 +38,9 @@ function PushChanges invoke-git checkout -b $branchName origin/$BaseBranch invoke-git commit --allow-empty -m $CommitMessage invoke-git push origin $branchName - invoke-gh pr create --base $BaseBranch --title $CommitMessage --body $CommitMessage + $prUrl = invoke-gh -returnValue pr create --base $BaseBranch --title $CommitMessage --body $CommitMessage + + return $prUrl } } @@ -242,8 +244,8 @@ try { } Set-Content -Path (Join-Path "./.github" "RELEASENOTES.copy.md") -Value $releaseNotes -Encoding utf8 } - PushChanges -BaseBranch $branch -CommitMessage "Deploying AL-Go from $algoBranch ($srcSHA) to $branch" -DirectCommit $directCommit - + $prUrl = PushChanges -BaseBranch $branch -CommitMessage "Deploying AL-Go from $algoBranch ($srcSHA) to $branch" -DirectCommit $directCommit + Write-Host "::notice::Deployed to $repo branch $branch. PR URL: $prUrl" } } finally { From add3881042b5d3c2e6f2516394c6e7323731bafc Mon Sep 17 00:00:00 2001 From: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com> Date: Wed, 21 Jan 2026 16:15:51 +0100 Subject: [PATCH 3/6] Fix casing in deployment notice and update API call in WaitWorkflow function --- Internal/Deploy.ps1 | 2 +- e2eTests/e2eTestHelper.psm1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Internal/Deploy.ps1 b/Internal/Deploy.ps1 index 8200f5504..4e997090e 100644 --- a/Internal/Deploy.ps1 +++ b/Internal/Deploy.ps1 @@ -245,7 +245,7 @@ try { Set-Content -Path (Join-Path "./.github" "RELEASENOTES.copy.md") -Value $releaseNotes -Encoding utf8 } $prUrl = PushChanges -BaseBranch $branch -CommitMessage "Deploying AL-Go from $algoBranch ($srcSHA) to $branch" -DirectCommit $directCommit - Write-Host "::notice::Deployed to $repo branch $branch. PR URL: $prUrl" + Write-Host "::Notice::Deployed to $repo branch $branch. PR URL: $prUrl" } } finally { diff --git a/e2eTests/e2eTestHelper.psm1 b/e2eTests/e2eTestHelper.psm1 index 1d0548738..0ac6dc7d4 100644 --- a/e2eTests/e2eTestHelper.psm1 +++ b/e2eTests/e2eTestHelper.psm1 @@ -304,7 +304,7 @@ function WaitWorkflow { if ($run.conclusion -ne "Success" -and $run.conclusion -ne "cancelled") { if (-not $noRerun.IsPresent) { Write-Host "::Warning::Rerunning workflow: $($run.name) run $($run.id), conclusion $($run.conclusion), url = $($run.html_url)" - gh api --method POST /repos/$repository/actions/runs/$runid/rerun | Out-Null + invoke-gh api --method POST /repos/$repository/actions/runs/$runid/rerun | Out-Null WaitWorkflow -repository $repository -runid $runid -noDelay:$noDelay -noError:$noError -noRerun } if (-not $noError.IsPresent) { throw "Workflow $($run.name), conclusion $($run.conclusion), url = $($run.html_url)" } From 9affc4a8760629fea85bba738f367a27c12ebb60 Mon Sep 17 00:00:00 2001 From: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com> Date: Wed, 21 Jan 2026 23:02:46 +0100 Subject: [PATCH 4/6] Update e2eTests/e2eTestHelper.psm1 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- e2eTests/e2eTestHelper.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2eTests/e2eTestHelper.psm1 b/e2eTests/e2eTestHelper.psm1 index 0ac6dc7d4..d14b219bc 100644 --- a/e2eTests/e2eTestHelper.psm1 +++ b/e2eTests/e2eTestHelper.psm1 @@ -303,7 +303,7 @@ function WaitWorkflow { if ($run.conclusion -ne "Success" -and $run.conclusion -ne "cancelled") { if (-not $noRerun.IsPresent) { - Write-Host "::Warning::Rerunning workflow: $($run.name) run $($run.id), conclusion $($run.conclusion), url = $($run.html_url)" + Write-Host "::warning::Rerunning workflow: $($run.name) run $($run.id), conclusion $($run.conclusion), url = $($run.html_url)" invoke-gh api --method POST /repos/$repository/actions/runs/$runid/rerun | Out-Null WaitWorkflow -repository $repository -runid $runid -noDelay:$noDelay -noError:$noError -noRerun } From 9096010b85017da72718f10b2f52ccaee50fbbf1 Mon Sep 17 00:00:00 2001 From: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com> Date: Wed, 21 Jan 2026 23:03:28 +0100 Subject: [PATCH 5/6] Update Internal/Deploy.ps1 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Internal/Deploy.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Internal/Deploy.ps1 b/Internal/Deploy.ps1 index 4e997090e..8200f5504 100644 --- a/Internal/Deploy.ps1 +++ b/Internal/Deploy.ps1 @@ -245,7 +245,7 @@ try { Set-Content -Path (Join-Path "./.github" "RELEASENOTES.copy.md") -Value $releaseNotes -Encoding utf8 } $prUrl = PushChanges -BaseBranch $branch -CommitMessage "Deploying AL-Go from $algoBranch ($srcSHA) to $branch" -DirectCommit $directCommit - Write-Host "::Notice::Deployed to $repo branch $branch. PR URL: $prUrl" + Write-Host "::notice::Deployed to $repo branch $branch. PR URL: $prUrl" } } finally { From 3b3358fd7aaa2fd510f9eb6774f6b8bf46121b6a Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 21 Jan 2026 23:30:13 +0100 Subject: [PATCH 6/6] Fix PushChanges return value handling for direct commits (#2093) --- Internal/Deploy.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Internal/Deploy.ps1 b/Internal/Deploy.ps1 index 8200f5504..1f8c978a4 100644 --- a/Internal/Deploy.ps1 +++ b/Internal/Deploy.ps1 @@ -26,6 +26,7 @@ function PushChanges # Direct commit to base branch invoke-git commit --allow-empty -m $CommitMessage invoke-git push origin $BaseBranch + return "" } else { # Create PR to base branch if (-not (git ls-remote --heads origin $BaseBranch)) { @@ -245,7 +246,11 @@ try { Set-Content -Path (Join-Path "./.github" "RELEASENOTES.copy.md") -Value $releaseNotes -Encoding utf8 } $prUrl = PushChanges -BaseBranch $branch -CommitMessage "Deploying AL-Go from $algoBranch ($srcSHA) to $branch" -DirectCommit $directCommit - Write-Host "::notice::Deployed to $repo branch $branch. PR URL: $prUrl" + if ($prUrl) { + Write-Host "::notice::Deployed to $repo branch $branch. PR URL: $prUrl" + } else { + Write-Host "::notice::Deployed to $repo branch $branch" + } } } finally {