Update image minimizer

This commit is contained in:
Naveen Singh
2024-11-17 22:42:38 +05:30
parent bf322c6ad8
commit 6751fda69f
2 changed files with 3 additions and 3 deletions

View File

@@ -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,

View File

@@ -5,7 +5,7 @@ on:
types: [created, edited]
issues:
types: [opened, edited]
pull_request:
pull_request_target:
types: [opened, edited]
permissions: