ci: allow commits on top of beta PRs (#11924)
This commit is contained in:
2
.github/workflows/nix-hashes.yml
vendored
2
.github/workflows/nix-hashes.yml
vendored
@@ -6,7 +6,7 @@ permissions:
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches: [dev]
|
branches: [dev, beta]
|
||||||
paths:
|
paths:
|
||||||
- "bun.lock"
|
- "bun.lock"
|
||||||
- "package.json"
|
- "package.json"
|
||||||
|
|||||||
@@ -128,10 +128,15 @@ async function main() {
|
|||||||
await $`git fetch origin beta`
|
await $`git fetch origin beta`
|
||||||
|
|
||||||
const localTree = await $`git rev-parse beta^{tree}`.text()
|
const localTree = await $`git rev-parse beta^{tree}`.text()
|
||||||
const remoteTree = await $`git rev-parse origin/beta^{tree}`.text()
|
const remoteTrees = (await $`git log origin/dev..origin/beta --format=%T`.text()).split("\n")
|
||||||
|
|
||||||
if (localTree.trim() === remoteTree.trim()) {
|
const matchIdx = remoteTrees.indexOf(localTree.trim())
|
||||||
console.log("Beta branch has identical contents, no push needed")
|
if (matchIdx !== -1) {
|
||||||
|
if (matchIdx !== 0) {
|
||||||
|
console.log(`Beta branch contains this sync, but additional commits exist after it. Leaving beta branch as is.`)
|
||||||
|
} else {
|
||||||
|
console.log("Beta branch has identical contents, no push needed")
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user