From 0ce69ed04f1f924b8c596b6c9b71655ba5024d73 Mon Sep 17 00:00:00 2001 From: Marcin Dobosz Date: Mon, 8 Aug 2022 12:34:13 -0700 Subject: [PATCH] fix(minimize-comments): allow action to run on 'pull_request_target' (#313) --- minimize-comments/dist/index.js | 2 +- minimize-comments/main.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/minimize-comments/dist/index.js b/minimize-comments/dist/index.js index 262fa89..86698dc 100644 --- a/minimize-comments/dist/index.js +++ b/minimize-comments/dist/index.js @@ -8942,7 +8942,7 @@ run(); async function run() { try { // Note: supporting other event types might require changing the query used - if (github_1.context.eventName !== "pull_request") { + if (!["pull_request", "pull_request_target"].includes(github_1.context.eventName)) { throw new Error(`This action is not supported for event of type '${github_1.context.eventName}'.`); } const token = (0, core_1.getInput)("github-token", { required: true }); diff --git a/minimize-comments/main.ts b/minimize-comments/main.ts index 8a388f1..5384576 100644 --- a/minimize-comments/main.ts +++ b/minimize-comments/main.ts @@ -6,7 +6,7 @@ run(); async function run() { try { // Note: supporting other event types might require changing the query used - if (context.eventName !== "pull_request") { + if (!["pull_request", "pull_request_target"].includes(context.eventName)) { throw new Error( `This action is not supported for event of type '${context.eventName}'.` );