From bf6479d5eca7bb49c9c6d58a0de6e0cd7770f15c Mon Sep 17 00:00:00 2001 From: Egor Kovetskiy Date: Thu, 25 Apr 2024 01:03:53 +0000 Subject: [PATCH] feat: add support for pull_request_target and only-new-issues (#506) --- dist/post_run/index.js | 2 +- dist/run/index.js | 2 +- src/run.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/post_run/index.js b/dist/post_run/index.js index e51711ce03..91fbc1b387 100644 --- a/dist/post_run/index.js +++ b/dist/post_run/index.js @@ -89177,7 +89177,7 @@ async function fetchPatch() { return ``; } const ctx = github.context; - if (ctx.eventName !== `pull_request`) { + if (ctx.eventName !== `pull_request` && ctx.eventName !== `pull_request_target`) { core.info(`Not fetching patch for showing only new issues because it's not a pull request context: event name is ${ctx.eventName}`); return ``; } diff --git a/dist/run/index.js b/dist/run/index.js index 7cc8c9a706..6e8230c265 100644 --- a/dist/run/index.js +++ b/dist/run/index.js @@ -89177,7 +89177,7 @@ async function fetchPatch() { return ``; } const ctx = github.context; - if (ctx.eventName !== `pull_request`) { + if (ctx.eventName !== `pull_request` && ctx.eventName !== `pull_request_target`) { core.info(`Not fetching patch for showing only new issues because it's not a pull request context: event name is ${ctx.eventName}`); return ``; } diff --git a/src/run.ts b/src/run.ts index 64e4164618..a721b760d9 100644 --- a/src/run.ts +++ b/src/run.ts @@ -32,7 +32,7 @@ async function fetchPatch(): Promise { } const ctx = github.context - if (ctx.eventName !== `pull_request`) { + if (ctx.eventName !== `pull_request` && ctx.eventName !== `pull_request_target`) { core.info(`Not fetching patch for showing only new issues because it's not a pull request context: event name is ${ctx.eventName}`) return `` }