From 217dc97d70a3280b6817e184e07c7d707cdb0786 Mon Sep 17 00:00:00 2001 From: peter-evans <18365890+peter-evans@users.noreply.github.com> Date: Tue, 10 Nov 2026 11:44:13 +0000 Subject: [PATCH] [CI] test committed --- dist/index.js | 6 ++++-- report.txt | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 report.txt diff --git a/dist/index.js b/dist/index.js index 0af2ad0513..4169be0d8b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1644,8 +1644,10 @@ class GitHubHelper { createOrUpdateRef(branchRepository, branch, newHead) { return __awaiter(this, void 0, void 0, function* () { const repository = this.parseRepository(branchRepository); - const branchExists = yield this.octokit.rest.repos - .getBranch(Object.assign(Object.assign({}, repository), { branch: branch })) + // Check the git ref directly rather than using the branches API, which + // follows branch rename redirects and can return a different branch. + const branchExists = yield this.octokit.rest.git + .getRef(Object.assign(Object.assign({}, repository), { ref: `heads/${branch}` })) .then(() => true, () => false); if (branchExists) { core.info(`Branch ${branch} exists; Updating ref`); diff --git a/report.txt b/report.txt new file mode 100644 index 0000000000..5061fff785 --- /dev/null +++ b/report.txt @@ -0,0 +1 @@ +1794311052