Skip to content

Commit

Permalink
feat: without_project_bots to the users API call, this should exclude…
Browse files Browse the repository at this point in the history
… bots from projects and groups and in the contributors card

Signed-off-by: Peter Macdonald <[email protected]>
  • Loading branch information
Parsifal-M committed Feb 20, 2023
1 parent 121254b commit d8de182
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/gitlab/src/api/GitlabCIClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export class GitlabCIClient implements GitlabCIApi {
Record<string, unknown>[]
>('users', {
search: contributorsData[i].email,
without_project_bots: true,
});
if (userProfile) {
userProfile.forEach(
Expand All @@ -162,7 +163,9 @@ export class GitlabCIClient implements GitlabCIApi {
username = username.slice(1);
}
const userDetail = (
await this.callApi<PeopleCardEntityData[]>('users', { username })
await this.callApi<PeopleCardEntityData[]>('users', {
username,
})
)?.[0];

if (!userDetail) throw new Error(`user ${username} does not exist`);
Expand Down

0 comments on commit d8de182

Please sign in to comment.