From 3ca68a180f39a4bbb3e0474fd6a7b3ab0324691f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 13 Jan 2026 10:42:00 +0000 Subject: [PATCH] Fix beta workflow to push release branch before creating PR Co-authored-by: louislam <1336778+louislam@users.noreply.github.com> --- extra/beta/update-version.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extra/beta/update-version.js b/extra/beta/update-version.js index 240d44608..2baf3a0fd 100644 --- a/extra/beta/update-version.js +++ b/extra/beta/update-version.js @@ -58,7 +58,13 @@ function commit(version) { throw new Error("commit error"); } - res = childProcess.spawnSync("git", ["push", "origin", "master"]); + // Get the current branch name + res = childProcess.spawnSync("git", ["rev-parse", "--abbrev-ref", "HEAD"]); + const currentBranch = res.stdout.toString().trim(); + console.log(`Pushing to current branch: ${currentBranch}`); + + // Push to the current branch with --set-upstream to create it on remote if it doesn't exist + res = childProcess.spawnSync("git", ["push", "--set-upstream", "origin", currentBranch]); console.log(res.stdout.toString().trim()); }