From e16bbc660d7bc19e3ae0e81173dcf55817e24e5e Mon Sep 17 00:00:00 2001 From: Don Date: Sat, 7 Nov 2015 00:06:15 -0600 Subject: [PATCH] use [auth.github] -> api_url property; supports git enterprise --- pkg/social/social.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/social/social.go b/pkg/social/social.go index 1a00934b937..06932f3d500 100644 --- a/pkg/social/social.go +++ b/pkg/social/social.go @@ -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