Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix broken merge group #112

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13943,7 +13943,11 @@ let BASE_SHA;
const headResult = spawnSync('git', ['rev-parse', 'HEAD'], { encoding: 'utf-8' });
const HEAD_SHA = headResult.stdout;

if (['pull_request', 'pull_request_target', 'merge_group'].includes(eventName) && !github.context.payload.pull_request.merged) {

if (
(['pull_request', 'pull_request_target'].includes(eventName) && !github.context.payload.pull_request.merged) ||
eventName == 'merge_group'
) {
try {
const mergeBaseRef = await findMergeBaseRef();
const baseResult = spawnSync('git', ['merge-base', `origin/${mainBranchName}`, mergeBaseRef], { encoding: 'utf-8' });
Expand Down
6 changes: 5 additions & 1 deletion find-successful-workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ let BASE_SHA;
const headResult = spawnSync('git', ['rev-parse', 'HEAD'], { encoding: 'utf-8' });
const HEAD_SHA = headResult.stdout;

if (['pull_request', 'pull_request_target', 'merge_group'].includes(eventName) && !github.context.payload.pull_request.merged) {

if (
(['pull_request', 'pull_request_target'].includes(eventName) && !github.context.payload.pull_request.merged) ||
eventName == 'merge_group'
) {
try {
const mergeBaseRef = await findMergeBaseRef();
const baseResult = spawnSync('git', ['merge-base', `origin/${mainBranchName}`, mergeBaseRef], { encoding: 'utf-8' });
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"version": "3.2.1",
"version": "3.2.2",
"license": "MIT",
"description": "This package.json is here purely to control the version of the Action, in combination with https://github.com/JamesHenry/publish-shell-action",
"scripts": {
Expand Down