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

This commit is contained in:
Chien Huey 2017-08-17 17:26:10 -04:00
parent c45185f601
commit 98f6a217d3

View File

@ -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
} }