-
Notifications
You must be signed in to change notification settings - Fork 668
fix: members: use new *All objects for *AllManager managers #1827
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
Conversation
24b28b6
to
88ac96d
Compare
Codecov Report
@@ Coverage Diff @@
## main #1827 +/- ##
=======================================
Coverage 92.19% 92.20%
=======================================
Files 77 77
Lines 4819 4823 +4
=======================================
+ Hits 4443 4447 +4
Misses 376 376
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Thanks @JohnVillalovos! At the beginning I was happy about the initial implementation because it wasn't duplicating things, but looks like it was kind of broken that way.
A good side-effect of this is that it will also work on the CLI now I'm pretty sure.
Yeah, because of that |
@JohnVillalovos I'm pretty sure this also closes #848 by adding a new CLI command:
would you mind adding a quick test for that? Edit: and just one more nit, |
Change it so that: GroupMemberAllManager uses GroupMemberAll object ProjectMemberAllManager uses ProjectMemberAll object Create GroupMemberAll and ProjectMemberAll objects that do not support any Mixin type methods. Previously we were using GroupMember and ProjectMember which support the `save()` and `delete()` methods but those methods will not work with objects retrieved using the `/members/all/` API calls. `list()` API calls: [1] GET /groups/:id/members/all GET /projects/:id/members/all `get()` API calls: [2] GET /groups/:id/members/all/:user_id GET /projects/:id/members/all/:user_id Closes: #1825 Closes: #848 [1] https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project-including-inherited-and-invited-members [2] https://docs.gitlab.com/ee/api/members.html#get-a-member-of-a-group-or-project-including-inherited-and-invited-members
88ac96d
to
755e0a3
Compare
Done. And found bug with this test. Thanks! |
Change it so that:
GroupMemberAllManager uses GroupMemberAll object
ProjectMemberAllManager uses ProjectMemberAll object
Create GroupMemberAll and ProjectMemberAll objects that do not support
any Mixin type methods. Previously we were using GroupMember and
ProjectMember which support the
save()
anddelete()
methods butthose methods will not work with objects retrieved using the
/members/all/
API calls.list()
API calls:GET /groups/:id/members/all
GET /projects/:id/members/all
get()
API calls:GET /groups/:id/members/all/:user_id
GET /projects/:id/members/all/:user_id
Closes: #1825
Closes: #848
[1] https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project-including-inherited-and-invited-members
[2] https://docs.gitlab.com/ee/api/members.html#get-a-member-of-a-group-or-project-including-inherited-and-invited-members