Skip to content
Snippets Groups Projects
Commit 98f6a217 authored by Chien Huey's avatar Chien Huey
Browse files

When connecting to GitHub Enterprise, force email verified field to true

parent c45185f6
No related branches found
No related tags found
No related merge requests found
...@@ -503,6 +503,11 @@ func (c *githubConnector) userEmail(ctx context.Context, client *http.Client) (s ...@@ -503,6 +503,11 @@ func (c *githubConnector) userEmail(ctx context.Context, client *http.Client) (s
} }
for _, email := range emails { for _, email := range emails {
// if GitHub Enterprise, set email.Verified to true
if c.hostName != "" {
email.Verified = true
}
if email.Verified && email.Primary { if email.Verified && email.Primary {
return email.Email, nil return email.Email, nil
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment