From 951449cb2b6b0bf2a94c8535669b63481f08c821 Mon Sep 17 00:00:00 2001 From: HARALD Date: Sat, 18 Nov 2023 07:21:04 -0500 Subject: [PATCH] feat: duplication collaborator --- src/handlers/comment/handlers/issue/identify-user-ids.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/handlers/comment/handlers/issue/identify-user-ids.ts b/src/handlers/comment/handlers/issue/identify-user-ids.ts index af5d3533c..2fff73d5c 100644 --- a/src/handlers/comment/handlers/issue/identify-user-ids.ts +++ b/src/handlers/comment/handlers/issue/identify-user-ids.ts @@ -31,7 +31,12 @@ async function filterUsers(context: Context, issue: Issue, contributorComments: (user: User) => !allRoleUsers.some((_user) => _user?.id === user.id) ); const uniqueContributors = Array.from(new Map(contributors.map((user) => [user.id, user])).values()); - return { issuer, assignees, collaborators, contributors: uniqueContributors }; + return { + issuer, + assignees, + collaborators: collaborators.filter((collaborator) => collaborator.id !== issuer.id), + contributors: uniqueContributors, + }; } function returnValues(