mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
use [auth.github] -> api_url property; supports git enterprise
This commit is contained in:
parent
d7ee7cb88f
commit
e16bbc660d
@ -193,7 +193,7 @@ func (s *SocialGithub) FetchPrivateEmail(client *http.Client) (string, error) {
|
||||
Verified bool `json:"verified"`
|
||||
}
|
||||
|
||||
emailsUrl := fmt.Sprintf("https://api.github.com/user/emails")
|
||||
emailsUrl := fmt.Sprintf(s.apiUrl + "/emails")
|
||||
r, err := client.Get(emailsUrl)
|
||||
if err != nil {
|
||||
return "", err
|
||||
@ -222,7 +222,7 @@ func (s *SocialGithub) FetchTeamMemberships(client *http.Client) ([]int, error)
|
||||
Id int `json:"id"`
|
||||
}
|
||||
|
||||
membershipUrl := fmt.Sprintf("https://api.github.com/user/teams")
|
||||
membershipUrl := fmt.Sprintf(s.apiUrl + "/teams")
|
||||
r, err := client.Get(membershipUrl)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -249,7 +249,7 @@ func (s *SocialGithub) FetchOrganizations(client *http.Client) ([]string, error)
|
||||
Login string `json:"login"`
|
||||
}
|
||||
|
||||
url := fmt.Sprintf("https://api.github.com/user/orgs")
|
||||
url := fmt.Sprintf(s.apiUrl + "/orgs")
|
||||
r, err := client.Get(url)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user