From e1ed65191e53311a6ac9269a612cd16034034715 Mon Sep 17 00:00:00 2001 From: Espen Halsaa Albrektsen Date: Wed, 22 Nov 2023 12:08:22 +0100 Subject: [PATCH 1/4] Also allow merge_group as TARGET_EVENT --- src/constant.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/constant.ts b/src/constant.ts index 123d1603..b8c52787 100644 --- a/src/constant.ts +++ b/src/constant.ts @@ -7,5 +7,6 @@ export const TARGET_EVENTS = { 'ready_for_review', ], 'push': '*', + 'merge_group': '*', }; export const REMOTE_NAME = 'get-diff-action'; From a58c39970ba681395958a6cfb2b903faae50be7a Mon Sep 17 00:00:00 2001 From: Espen Halsaa Albrektsen Date: Wed, 22 Nov 2023 12:09:27 +0100 Subject: [PATCH 2/4] Added merge_group to TARGET_EVENTS --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d1ab583b..c65eb207 100644 --- a/README.md +++ b/README.md @@ -218,7 +218,8 @@ If there is no difference in the source code below, this workflow will skip the | eventName | action | |:---|:---| | pull_request | opened, reopened, synchronize, closed, ready_for_review | -| push | * | +| push | * | +| merge_group | * | If called on any other event, the result will be empty. From 037c94bd3dfe0547f05374c457b537b969f9e690 Mon Sep 17 00:00:00 2001 From: Espen Albrektsen Date: Wed, 22 Nov 2023 16:40:31 +0100 Subject: [PATCH 3/4] Use merge_group.base and head sha --- src/utils/misc.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/utils/misc.ts b/src/utils/misc.ts index 086e32f9..445108f9 100644 --- a/src/utils/misc.ts +++ b/src/utils/misc.ts @@ -75,5 +75,12 @@ export const getDiffInfo = async(octokit: Octokit, context: Context): Promise Date: Fri, 24 Nov 2023 15:06:44 +0100 Subject: [PATCH 4/4] get-diff-action@v6 instead of @gh-actions since the @gh_actions call the crypto.getRandomValues() that is no longer supported --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d343495f..c4317e73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: run: echo "RUNNING=1" >> $GITHUB_ENV - uses: actions/checkout@v3 - uses: technote-space/get-git-comment-action@v1 - - uses: technote-space/get-diff-action@gh-actions + - uses: technote-space/get-diff-action@v6 with: PATTERNS: +(src|__tests__)/**/*.+(js|ts) FILES: | @@ -56,7 +56,7 @@ jobs: run: echo "RUNNING=1" >> $GITHUB_ENV - uses: actions/checkout@v3 - uses: technote-space/get-git-comment-action@v1 - - uses: technote-space/get-diff-action@gh-actions + - uses: technote-space/get-diff-action@v6 with: PATTERNS: +(src|__tests__)/**/*.+(js|ts|snap) FILES: |