Switch to the new Teams API#1395
Conversation
gsmet
left a comment
There was a problem hiding this comment.
@bitwiseman this PR is time sensitive as GitHub will do another brownout on March 8th (see https://github.blog/changelog/2022-02-22-sunset-notice-deprecated-teams-api-endpoints/).
It's probably a good idea to get something released before that.
| @Deprecated | ||
| public GHTeam getTeam(int id) throws IOException { | ||
| return createRequest().withUrlPath("/teams/" + id).fetch(GHTeam.class).wrapUp(this); | ||
| } |
There was a problem hiding this comment.
I decided to remove this method as even if it could work for old GH Entreprise instances, you would end up with a dead end and an object that can't do anything useful.
I can adjust if you prefer I keep it and throw an exception or if you prefer keeping it altogether.
There was a problem hiding this comment.
We must preserve API compatibility. Feel free to have it throw if needed.
Codecov Report
@@ Coverage Diff @@
## main #1395 +/- ##
============================================
+ Coverage 78.10% 78.11% +0.01%
- Complexity 2046 2047 +1
============================================
Files 200 200
Lines 6271 6274 +3
Branches 355 355
============================================
+ Hits 4898 4901 +3
Misses 1165 1165
Partials 208 208
Continue to review full report at Codecov.
|
|
@gsmet First step is to determine what is the oldest version of GHE that supports the new endpoints. |
|
My assumption was that they would continue to use older versions of the GitHub API. I can try to maintain the old behavior but I won't be able to test it though. |
|
Wow. It looks like they have gotten aggressive about deprecation. 3.1 is the oldest currently supported version. https://docs.github.com/en/enterprise-server@3.4/admin/all-releases |
|
AFAICS, they already removed the old teams endpoint in 3.1. |
|
So, in short, all we need is to revert the method removal and we're good. |
|
Yeah I'm doing that as we speak. |
…(int) This API is not supported anymore.
|
@bitwiseman done! |
|
@bitwiseman do you plan a new release before the next brownout of March 8th? Personally I don't use this API but some users asked for it. |
https://developer.github.com/changes/2020-01-21-moving-the-team-api-endpoints/
https://github.blog/changelog/2022-02-22-sunset-notice-deprecated-teams-api-endpoints/
Fixes #1386