Merge pull request #1560 from iamjarvo/auth-with-ghe
Match user url against default api url
This commit is contained in:
commit
a9c84d26e1
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ func GetUserEmail(client *github.Client) (*github.User, error) {
|
||||||
// WARNING, HACK
|
// WARNING, HACK
|
||||||
// for out-of-date github enterprise editions the primary
|
// for out-of-date github enterprise editions the primary
|
||||||
// and verified fields won't exist.
|
// and verified fields won't exist.
|
||||||
if !strings.HasPrefix(*user.HTMLURL, DefaultURL) && len(emails) != 0 {
|
if !strings.HasPrefix(*user.URL, DefaultAPI) && len(emails) != 0 {
|
||||||
user.Email = emails[0].Email
|
user.Email = emails[0].Email
|
||||||
return user, nil
|
return user, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue