From b334b363d1ee20c723bb6bd67a7aced31d7cd12d Mon Sep 17 00:00:00 2001 From: Steve Riesenberg <5248162+sjohnr@users.noreply.github.com> Date: Tue, 7 Jun 2022 15:09:22 -0500 Subject: [PATCH] Exclude PRs from external repos Closes gh-38 --- src/main.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.ts b/src/main.ts index 3a8ec06..62ce564 100644 --- a/src/main.ts +++ b/src/main.ts @@ -162,6 +162,10 @@ async function main(): Promise { // Build Pull Request string if required const pull_requests = (workflow_run.pull_requests as PullRequest[]) + .filter( + pull_request => + pull_request.base.repo.url === workflow_run.repository.url // exclude PRs from external repositories + ) .map( pull_request => `<${workflow_run.repository.html_url}/pull/${pull_request.number}|#${pull_request.number}> from \`${pull_request.head.ref}\` to \`${pull_request.base.ref}\``