mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 12:38:00 +01:00
Update image minimizer
This commit is contained in:
parent
0fcda500bc
commit
694c3096e7
2 changed files with 3 additions and 3 deletions
4
.github/workflows/image-minimizer.js
vendored
4
.github/workflows/image-minimizer.js
vendored
|
@ -18,7 +18,7 @@ module.exports = async ({github, context}) => {
|
||||||
initialBody = context.payload.comment.body;
|
initialBody = context.payload.comment.body;
|
||||||
} else if (context.eventName == 'issues') {
|
} else if (context.eventName == 'issues') {
|
||||||
initialBody = context.payload.issue.body;
|
initialBody = context.payload.issue.body;
|
||||||
} else if (context.eventName == 'pull_request') {
|
} else if (context.eventName == 'pull_request_target') {
|
||||||
initialBody = context.payload.pull_request.body;
|
initialBody = context.payload.pull_request.body;
|
||||||
} else {
|
} else {
|
||||||
console.log('Aborting: No body found');
|
console.log('Aborting: No body found');
|
||||||
|
@ -77,7 +77,7 @@ module.exports = async ({github, context}) => {
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
body: newBody
|
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);
|
console.log('Updating pull request', context.payload.pull_request.number);
|
||||||
await github.rest.pulls.update({
|
await github.rest.pulls.update({
|
||||||
pull_number: context.payload.pull_request.number,
|
pull_number: context.payload.pull_request.number,
|
||||||
|
|
2
.github/workflows/image-minimizer.yml
vendored
2
.github/workflows/image-minimizer.yml
vendored
|
@ -5,7 +5,7 @@ on:
|
||||||
types: [created, edited]
|
types: [created, edited]
|
||||||
issues:
|
issues:
|
||||||
types: [opened, edited]
|
types: [opened, edited]
|
||||||
pull_request:
|
pull_request_target:
|
||||||
types: [opened, edited]
|
types: [opened, edited]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
|
Loading…
Reference in a new issue