-
Notifications
You must be signed in to change notification settings - Fork 92
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
feat: add membership APIs to manage team members #137
Conversation
Codecov Report
@@ Coverage Diff @@
## master #137 +/- ##
============================================
+ Coverage 74.23% 74.94% +0.70%
- Complexity 263 272 +9
============================================
Files 41 42 +1
Lines 920 946 +26
Branches 41 41
============================================
+ Hits 683 709 +26
Misses 212 212
Partials 25 25
|
public TeamClient createTeamClient(final GitHubClient github, final String org) { | ||
return TeamClient.create(github, org); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a breaking change from the earlier version 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had the same thought, but I think it's fine since we just released the code that we're breaking here last week (#135), therefore nobody is using it yet probably.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point that hopefully no one is using it. Can we also unpublish the earlier version somehow? In case someone decide to use it in future?
Other than that I agree it's not worth the effort to fix the breakage.
What this PR does:
The organisation client has been refactored to better mirror the GitHub API and also match the existing pattern of nested APIs across the client. There is now a Teams Client that is nested under the organisation client which exposes the existing Teams APIs and adds the additional Membership endpoints below:
What happens next:
This refactor allows organisation related endpoints to be attached directly to the organisation client whilst keeping the Teams/Memberships endpoints separated.
Tests:
Unit tests have been created for all the above mentioned endpoints.
Fixtures were created using the expected request and response bodies as detailed in the Github Memberships API documentation here: https://docs.github.com/en/rest/teams/members?apiVersion=2022-11-28