- Notifications
You must be signed in to change notification settings - Fork673
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
24b28b6
to88ac96d
Comparecodecov-commenter commentedJan 12, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
JohnVillalovos commentedJan 13, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Yeah, because of that |
nejch commentedJan 13, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@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 objectCreate GroupMemberAll and ProjectMemberAll objects that do not supportany Mixin type methods. Previously we were using GroupMember andProjectMember which support the `save()` and `delete()` methods butthose 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_idCloses:#1825Closes:#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
to755e0a3
Compare
Done. And found bug with this test. Thanks! |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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