Skip to content
This repository was archived by the owner on Feb 19, 2026. It is now read-only.

Commit 3ab41d5

Browse files
committed
ci: skip force push when beta branch is unchanged
1 parent d3d783e commit 3ab41d5

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

script/beta.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,18 @@ async function main() {
124124
throw new Error(`${failed.length} PR(s) failed to merge`)
125125
}
126126

127-
console.log("\nForce pushing beta branch...")
127+
console.log("\nChecking if beta branch has changes...")
128+
await $`git fetch origin beta`
129+
130+
const localTree = await $`git rev-parse beta^{tree}`.text()
131+
const remoteTree = await $`git rev-parse origin/beta^{tree}`.text()
132+
133+
if (localTree.trim() === remoteTree.trim()) {
134+
console.log("Beta branch has identical contents, no push needed")
135+
return
136+
}
137+
138+
console.log("Force pushing beta branch...")
128139
await $`git push origin beta --force --no-verify`
129140

130141
console.log("Successfully synced beta branch")

0 commit comments

Comments
 (0)