Skip to content

Commit 5316361

Browse files
committed
fix: switch base to point to base.ref over main branching point
1 parent b691dd2 commit 5316361

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29960,7 +29960,7 @@ let BASE_SHA;
2996029960
let HEAD_SHA = headResult.stdout;
2996129961
if (['pull_request', 'pull_request_target'].includes(eventName) &&
2996229962
!github.context.payload.pull_request.merged) {
29963-
const baseResult = (0, child_process_1.spawnSync)('git', ['merge-base', `origin/${mainBranchName}`, 'HEAD'], { encoding: 'utf-8' });
29963+
const baseResult = github.context.payload.base.ref;
2996429964
BASE_SHA = baseResult.stdout;
2996529965
}
2996629966
else if (eventName == 'merge_group') {

find-successful-workflow.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ let BASE_SHA: string;
4242
['pull_request', 'pull_request_target'].includes(eventName) &&
4343
!github.context.payload.pull_request.merged
4444
) {
45-
const baseResult = spawnSync(
46-
'git',
47-
['merge-base', `origin/${mainBranchName}`, 'HEAD'],
48-
{ encoding: 'utf-8' },
49-
);
45+
const baseResult = github.context.payload.base.ref;
5046
BASE_SHA = baseResult.stdout;
5147
} else if (eventName == 'merge_group') {
5248
const baseResult = spawnSync('git', ['rev-parse', 'HEAD^1'], {

0 commit comments

Comments
 (0)