Skip to content

Commit

Permalink
Update main.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mhemmings authored and thafryer committed Oct 31, 2023
1 parent 7fb819c commit 9826540
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions action-src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 9826540

Please sign in to comment.