From 7022d2a4eea23111be6a1d4888d0eb9229d212d2 Mon Sep 17 00:00:00 2001 From: Kouadio Fabrice Nguessan Date: Fri, 2 Aug 2024 12:44:35 +0000 Subject: [PATCH] refactor(repository.js) : Filtering Pull Requests --- src/services/repository.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/services/repository.ts b/src/services/repository.ts index b327828..0fd8896 100644 --- a/src/services/repository.ts +++ b/src/services/repository.ts @@ -76,12 +76,14 @@ export default class Repository { issue, { headers: this.#org.headers } ); + const filteredIssues = issues.filter((row) => !("pull_request" in row)); + return { name: full_name, pr: pulls .filter((row) => row.user !== null) .map((row) => row.user!.login), - issues: issues + issues: filteredIssues .filter((row) => row.user !== null) .map((row) => row.user!.login) };