Commit e59d67f4 authored by rithu leena john's avatar rithu leena john Committed by GitHub

Merge pull request #1038 from xogroup/github-enterprise

When connecting to GitHub Enterprise, force email verified field to true
parents 20fd3163 99370b58
...@@ -501,6 +501,20 @@ func (c *githubConnector) userEmail(ctx context.Context, client *http.Client) (s ...@@ -501,6 +501,20 @@ 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
This change being made because GitHub Enterprise does not
support email verification. CircleCI indicated that GitHub
advised them not to check for verified emails
(https://circleci.com/enterprise/changelog/#1-47-1).
In addition, GitHub Enterprise support replied to a support
ticket with "There is no way to verify an email address in
GitHub Enterprise."
*/
if c.hostName != "" {
email.Verified = true
}
if email.Verified && email.Primary { if email.Verified && email.Primary {
return email.Email, nil return email.Email, nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment