-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Github Enterprise API differs significantly from supported in TeamsService methods #1524
Comments
Hi @chestone, and thank you for your feedback. The primary goal of this repo has always been to support the latest version of the official public GitHub Developer v3 API, documented here: https://developer.github.com/v3/ Where it is possible, we have also attempted to support Enterprise GitHub users. This is obviously a challenging problem without a clear, easy solution. My very best recommendation, in all honesty, is to raise this exact same issue as you have stated it with the excellent technical support staff at [email protected]. They are not only experts of both the Enterprise and public APIs, but they may also have thought of this and might have ideas on how to address it. I'll leave this issue open in case others have ideas or in case you take me up on this suggestion... once you hear back from tech support, I would love to hear how they think that this issue could be addressed. Thanks again. |
I spoke with GitHub support about this and their response was that GHE API lags GitHub.com API but will generally catch up. It looks like the |
@chestone @r-bennett I'm trying to use go-github library for my enterprise github instance, but the defaultBaseURL always point to |
See NewEnterpriseClient. Does that do what you're looking for?
…On Wed, Oct 7, 2020, 12:36 PM Smit Modi ***@***.***> wrote:
@chestone <https://github.com/chestone> @r-bennett
<https://github.com/r-bennett> I'm trying to use go-github library for my
enterprise github instance, but the defaultBaseURL
<https://github.com/google/go-github/blob/master/github/github.go#L31>
always point to https://api.github.com/. Is there a way I can change it
to https://[GitHubEnterpriseHostname]/?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1524 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAIWEKRUQHKCQP4WOPTY3SJS7MZANCNFSM4NBDZ2DA>
.
|
@willnorris Thank you! That's what I was looking for. |
Closing resolved issue. |
I've been working with this library used with Github Enterprise(v2.19 & v2.20) and I have noticed that it has continued to drift from the Enterprise API, tending to stick with the Github.com API definition. The issues that I've run into in particular surround the TeamsService and progressively adding
/org/:org
and/organizations/:org_id
to the route, which are not present in their GHE counterparts. Though I have noticed this in TeamsService, I imagine it exists elsewhere. Though there is support for creating Enterprise client connections and many API methods continue to work I have seen with each new version more methods drifting away from supporting GHE's API.For example the (*TeamsService) RemoveTeamMembershipBySlug method will generate the following
Github Golang Lib v31.0.0:
DELETE /orgs/:org/teams/:team_slug/memberships/:username
GHE API 2.20:
DELETE /teams/:team_id/memberships/:username
ref: https://github.com/google/go-github/blob/v31.0.0/github/teams_members.go#L185
GHE 2.20 API Teams/Members: https://developer.github.com/enterprise/2.20/v3/teams/members
Github.com API Teams/Members: https://developer.github.com/v3/teams/members
Similar disparities exist for many of the methods in the TeamsService type. It appears from previous versions of the library that this drift is continuing to grow away from the GHE API as that and Github.com do. Are there any thoughts or strategies for supporting both Github.com & Github Enterprise APIs with this library?
The text was updated successfully, but these errors were encountered: