fix: use publicEmail in GitLab client

client was using commitEmail that is visible only for self-managed GitLab admins.
publicEmail is visible, but only if the user explicitly enable the corresponding setting on GitLab.

Signed-off-by: Matteo Silvestri <matteosilv@gmail.com>
This commit is contained in:
Matteo Silvestri
2023-09-25 11:59:01 +02:00
parent e0927060c3
commit fae0735ee0
2 changed files with 3 additions and 3 deletions
@@ -205,7 +205,7 @@ export class GitLabClient {
user {
id
username
commitEmail
publicEmail
name
state
webUrl
@@ -240,7 +240,7 @@ export class GitLabClient {
const formattedUserResponse = {
id: Number(userItem.user.id.replace(/^gid:\/\/gitlab\/User\//, '')),
username: userItem.user.username,
email: userItem.user.commitEmail,
email: userItem.user.publicEmail,
name: userItem.user.name,
state: userItem.user.state,
web_url: userItem.user.webUrl,
@@ -64,7 +64,7 @@ export type GitLabGroupMembersResponse = {
user: {
id: string;
username: string;
commitEmail: string;
publicEmail: string;
name: string;
state: string;
webUrl: string;