Skip to content

Commit

Permalink
Update image minimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
naveensingh committed Nov 17, 2024
1 parent 0c69d15 commit d558cfd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/image-minimizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/image-minimizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 5,7 @@ on:
types: [created, edited]
issues:
types: [opened, edited]
pull_request:
pull_request_target:
types: [opened, edited]

permissions:
Expand Down

0 comments on commit d558cfd

Please sign in to comment.