From dcb3fe254d4eae129ce51ffd2cac133ad4d341c3 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 6 May 2026 18:27:33 +0200 Subject: [PATCH 1/3] test(updater): Update sentry-cli branch assertion sentry-cli currently has main and master pointing at the same HEAD, so the updater emits both names in mainBranch output. Match that fixture output instead of requiring master only. --- updater/tests/update-dependency.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/updater/tests/update-dependency.Tests.ps1 b/updater/tests/update-dependency.Tests.ps1 index 25bfbed5..5bce0b98 100644 --- a/updater/tests/update-dependency.Tests.ps1 +++ b/updater/tests/update-dependency.Tests.ps1 @@ -220,7 +220,7 @@ switch ($action) $output | Should -Contain 'latestTag=0.28.0' $output | Should -Contain 'latestTagNice=v0.28.0' $output | Should -Contain 'url=https://github.com/getsentry/sentry-cli' - $output | Should -Contain 'mainBranch=master' + $output | Should -Contain 'mainBranch=main master' } } From fbcb5e6c67063a4b853c320e02a16ba4cfb55267 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 7 May 2026 12:24:18 +0200 Subject: [PATCH 2/3] select first --- updater/scripts/update-dependency.ps1 | 2 +- updater/tests/update-dependency.Tests.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/updater/scripts/update-dependency.ps1 b/updater/scripts/update-dependency.ps1 index dec0b20e..b17b50a4 100644 --- a/updater/scripts/update-dependency.ps1 +++ b/updater/scripts/update-dependency.ps1 @@ -162,7 +162,7 @@ if ("$Tag" -eq '') { if ("$headRef" -eq '') { throw "Couldn't determine repository head (no ref returned by ls-remote HEAD" } - $mainBranch = (git ls-remote --heads $url | Where-Object { $_.StartsWith($headRef) }) -replace '.*\srefs/heads/', '' + $mainBranch = (git ls-remote --heads $url | Where-Object { $_.StartsWith($headRef) } | Select-Object -First 1) -replace '.*\srefs/heads/', '' } $url = $url -replace '\.git$', '' diff --git a/updater/tests/update-dependency.Tests.ps1 b/updater/tests/update-dependency.Tests.ps1 index 5bce0b98..a7a1578a 100644 --- a/updater/tests/update-dependency.Tests.ps1 +++ b/updater/tests/update-dependency.Tests.ps1 @@ -220,7 +220,7 @@ switch ($action) $output | Should -Contain 'latestTag=0.28.0' $output | Should -Contain 'latestTagNice=v0.28.0' $output | Should -Contain 'url=https://github.com/getsentry/sentry-cli' - $output | Should -Contain 'mainBranch=main master' + $output | Should -Contain 'mainBranch=main' } } From ea0a1fba173b9dc86fadebb6173e0ec5d4564d76 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 7 May 2026 13:35:42 +0200 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f222658d..eb356d9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ - Validate PR - Skip validation for PRs with fewer than 100 lines changed, excluding common lock files (`Cargo.lock`, `yarn.lock`, `package-lock.json`, `Pipfile.lock`, etc.). Tiny PRs no longer go through the issue-discussion loop. - Add validate-pr composite action for validating non-maintainer PRs against contribution guidelines ([#153](https://github.com/getsentry/github-workflows/pull/153)) +### Fixes + +- Updater - Select the first branch when multiple branches point at `HEAD` ([#165](https://github.com/getsentry/github-workflows/pull/165)) + ## 3.3.0 ### Features