mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-30 08:06:52 +02:00
Merge pull request #1560 from iamjarvo/auth-with-ghe
Match user url against default api url
This commit is contained in:
commit
a9c84d26e1
@ -58,7 +58,7 @@ func GetUserEmail(client *github.Client) (*github.User, error) {
|
||||
// WARNING, HACK
|
||||
// for out-of-date github enterprise editions the primary
|
||||
// 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
|
||||
return user, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user