Browse Source

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

pull/1038/head
Chien Huey 9 years ago
parent
commit
98f6a217d3
  1. 5
      connector/github/github.go

5
connector/github/github.go

@ -503,6 +503,11 @@ func (c *githubConnector) userEmail(ctx context.Context, client *http.Client) (s
}
for _, email := range emails {
// if GitHub Enterprise, set email.Verified to true
if c.hostName != "" {
email.Verified = true
}
if email.Verified && email.Primary {
return email.Email, nil
}

Loading…
Cancel
Save