From 7fd800521c560a97a2fd336a8f8d53c47442b52a Mon Sep 17 00:00:00 2001 From: "v.savkin" Date: Mon, 5 Oct 2026 10:52:28 +0600 Subject: [PATCH] fix: regenerate finds a sample branch by its exact ref - regenerate.yml asks git ls-remote for refs/heads/: a bare name matched by its tail, so the branch of a pull request, feat/full-alt, passed for full-alt, the job checked out a branch that did not exist and the first generation of full-alt failed - checked against the remote with a decoy tmp/decoy-check: the bare name finds decoy-check, the exact ref does not, and finds full-alt, which exists --- .github/workflows/regenerate.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regenerate.yml b/.github/workflows/regenerate.yml index 018594e..fc8455f 100644 --- a/.github/workflows/regenerate.yml +++ b/.github/workflows/regenerate.yml @@ -100,7 +100,9 @@ jobs: export GIT_SSH_COMMAND="ssh -i $key -o IdentitiesOnly=yes -o StrictHostKeyChecking=accept-new" git clone -q "git@github.com:${GITHUB_REPOSITORY}.git" branch cd branch - if git ls-remote --exit-code --heads origin "${{ matrix.branch }}" >/dev/null; then + # The exact ref: a bare name matches by its tail, and a pull request's branch such as + # feat/full-alt would pass for full-alt. + if git ls-remote --exit-code origin "refs/heads/${{ matrix.branch }}" >/dev/null; then git checkout -q "${{ matrix.branch }}" else git checkout -q --orphan "${{ matrix.branch }}"