File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ permissions:
66on :
77 workflow_dispatch :
88 push :
9- branches : [dev]
9+ branches : [dev, beta ]
1010 paths :
1111 - " bun.lock"
1212 - " package.json"
Original file line number Diff line number Diff line change @@ -128,10 +128,15 @@ async function main() {
128128 await $ `git fetch origin beta`
129129
130130 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+ }
135140 return
136141 }
137142
You can’t perform that action at this time.
0 commit comments