From a95f228905557bbfeb4e907355cefe531b3fe015 Mon Sep 17 00:00:00 2001 From: hatayama Date: Sat, 13 Jun 2026 02:10:43 +0900 Subject: [PATCH] chore: Clear GITHUB_HEAD_REF in minimum-version base-ref skip test GitHub Actions sets GITHUB_HEAD_REF for every step of pull_request runs, so on the release-please release PR the inherited release-please--branches--v3-beta value made the release-please skip fire before the base-ref skip under test, failing build-cli on the release PR itself. The test now controls GITHUB_HEAD_REF explicitly like the architecture test harness already does. --- cli/internal/automation/minimum_version_warning_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/internal/automation/minimum_version_warning_test.go b/cli/internal/automation/minimum_version_warning_test.go index e0198a637b..aac3006b57 100644 --- a/cli/internal/automation/minimum_version_warning_test.go +++ b/cli/internal/automation/minimum_version_warning_test.go @@ -45,6 +45,9 @@ func TestMinimumVersionWarningSkipsMissingBaseRefBeforeRepositoryResolution(t *t t.Setenv("PR_NUMBER", "123") t.Setenv("GITHUB_REPOSITORY", "") t.Setenv("GITHUB_BASE_REF", "") + // CI sets the real PR head branch for every step; clear it so the + // release-please skip cannot fire before the base-ref skip under test. + t.Setenv("GITHUB_HEAD_REF", "") t.Setenv("CLI_MINIMUM_VERSION_BASE_REF", "") t.Setenv("CLI_MINIMUM_VERSION_HEAD_REF", "") t.Setenv("PATH", t.TempDir())