From 694c3096e7debdd8acc5d15fc8fe36fffe083c75 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Sun, 17 Nov 2024 22:42:38 +0530 Subject: [PATCH] Update image minimizer --- .github/workflows/image-minimizer.js | 4 ++-- .github/workflows/image-minimizer.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/image-minimizer.js b/.github/workflows/image-minimizer.js index f81a49e15..ca4ae10e9 100644 --- a/.github/workflows/image-minimizer.js +++ b/.github/workflows/image-minimizer.js @@ -18,7 +18,7 @@ module.exports = async ({github, context}) => { initialBody = context.payload.comment.body; } else if (context.eventName == 'issues') { initialBody = context.payload.issue.body; - } else if (context.eventName == 'pull_request') { + } else if (context.eventName == 'pull_request_target') { initialBody = context.payload.pull_request.body; } else { console.log('Aborting: No body found'); @@ -77,7 +77,7 @@ module.exports = async ({github, context}) => { repo: context.repo.repo, body: newBody }); - } else if (context.eventName == 'pull_request') { + } else if (context.eventName == 'pull_request_target') { console.log('Updating pull request', context.payload.pull_request.number); await github.rest.pulls.update({ pull_number: context.payload.pull_request.number, diff --git a/.github/workflows/image-minimizer.yml b/.github/workflows/image-minimizer.yml index d9241c33b..a3c1f07ed 100644 --- a/.github/workflows/image-minimizer.yml +++ b/.github/workflows/image-minimizer.yml @@ -5,7 +5,7 @@ on: types: [created, edited] issues: types: [opened, edited] - pull_request: + pull_request_target: types: [opened, edited] permissions: