When connecting to GitHub Enterprise, force email verified field to true
This commit is contained in:
parent
c45185f601
commit
98f6a217d3
@ -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
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user