From 7fb819c26f8bb37551065cd0ea1327b78565a0e0 Mon Sep 17 00:00:00 2001 From: Mark Hemmings Date: Mon, 25 Sep 2023 18:50:14 +0100 Subject: [PATCH 1/2] Allow Github merge queues --- action-src/main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action-src/main.ts b/action-src/main.ts index c4f6a9efc..886d41379 100755 --- a/action-src/main.ts +++ b/action-src/main.ts @@ -20,7 +20,8 @@ const getBuildInfo = (event: typeof context) => { switch (event.eventName) { case 'pull_request': case 'pull_request_review': - case 'pull_request_target': { + case 'pull_request_target': + case 'merge_group': { const { head } = event.payload.pull_request; return { sha: head.sha, From 9826540533bdb6938aa9e4325161ea975d32a463 Mon Sep 17 00:00:00 2001 From: Mark Hemmings Date: Mon, 25 Sep 2023 19:00:14 +0100 Subject: [PATCH 2/2] Update main.ts --- action-src/main.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/action-src/main.ts b/action-src/main.ts index 886d41379..0940e34a8 100755 --- a/action-src/main.ts +++ b/action-src/main.ts @@ -20,8 +20,7 @@ const getBuildInfo = (event: typeof context) => { switch (event.eventName) { case 'pull_request': case 'pull_request_review': - case 'pull_request_target': - case 'merge_group': { + case 'pull_request_target': { const { head } = event.payload.pull_request; return { sha: head.sha, @@ -69,6 +68,14 @@ const getBuildInfo = (event: typeof context) => { slug: event.payload.repository.full_name, }; } + case 'merge_group': { + const { head_sha, head_ref } = event.payload.merge_group; + return { + sha: head_sha, + branch: head_ref, + slug: event.payload.repository.full_name, + }; + } default: { setFailed(`${event.eventName} event is not supported in this action`); return null;