GeezerVison is showing github.com — ci: allow commits on top of beta PRs (#11924) · major/opencode@6eb043a
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/nix-hashes.yml +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ permissions: |
6 | 6 | on: |
7 | 7 | workflow_dispatch: |
8 | 8 | push: |
9 | | - branches: [dev] |
| 9 | + branches: [dev, beta] |
10 | 10 | paths: |
11 | 11 | - "bun.lock" |
12 | 12 | - "package.json" |
|
Collapse file
Copy file name to clipboardExpand all lines: script/beta.ts +9-4Lines changed: 9 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -128,10 +128,15 @@ async function main() { |
128 | 128 | await $`git fetch origin beta` |
129 | 129 |
|
130 | 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") |
| 131 | + const remoteTrees = (await $`git log origin/dev..origin/beta --format=%T`.text()).split("\n") |
| 132 | + |
| 133 | + const matchIdx = remoteTrees.indexOf(localTree.trim()) |
| 134 | + if (matchIdx !== -1) { |
| 135 | + if (matchIdx !== 0) { |
| 136 | + console.log(`Beta branch contains this sync, but additional commits exist after it. Leaving beta branch as is.`) |
| 137 | + } else { |
| 138 | + console.log("Beta branch has identical contents, no push needed") |
| 139 | + } |
135 | 140 | return |
136 | 141 | } |
137 | 142 |
|
|