-
-
Notifications
You must be signed in to change notification settings - Fork 300
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
List all resource members, including inherited members #141
Comments
Oops! I'll fix this tonight! |
Awesome, thanks for the super quick reply |
const membersIncludingInherited = await ProjectsMembers.all(id)
const membersWithoutInherited = await ProjectMembers.all(id, {excludeInherited: true}) Does this work for you :) ? |
I'm pretty sure your changes are correct, but it doesn't work for my Gitlab 11.1.2. instance. It seems like this API endpoint is coming in 11.2: https://gitlab.com/gitlab-org/gitlab-ce/commit/046796cc3a98068e99abed152145e76c4636959c Thank you so much for the quick response. I'm going to report back if it works once the endpoint becomes available :) |
# [3.8.0](3.7.0...3.8.0) (2018-08-14) ### Bug Fixes * **api:** Updating project members all function to include the inherited members. [#141](#141) ([e081a16](e081a16)) * **package:** update [@semantic-release](https://github.com/semantic-release)/npm to version 5.0.0 ([dc9748d](dc9748d)) * **package:** update [@semantic-release](https://github.com/semantic-release)/npm to version 5.0.1 ([12b6ca1](12b6ca1)), closes [#139](#139) * **package:** Updating packages and fixing [#140](#140) due to a babel update ([04d1769](04d1769)) ### Features * Add push rule service ([#143](#143)) ([395f83c](395f83c)) * Add transfer a project to a new namespace ([#145](#145)) ([87e9f55](87e9f55))
# [3.8.0](jdalrymple/gitbeaker@3.7.0...3.8.0) (2018-08-14) ### Bug Fixes * **api:** Updating project members all function to include the inherited members. [jdalrymple#141](jdalrymple#141) ([e081a16](jdalrymple@e081a16)) * **package:** update [@semantic-release](https://github.com/semantic-release)/npm to version 5.0.0 ([dc9748d](jdalrymple@dc9748d)) * **package:** update [@semantic-release](https://github.com/semantic-release)/npm to version 5.0.1 ([12b6ca1](jdalrymple@12b6ca1)), closes [jdalrymple#139](jdalrymple#139) * **package:** Updating packages and fixing [jdalrymple#140](jdalrymple#140) due to a babel update ([04d1769](jdalrymple@04d1769)) ### Features * Add push rule service ([jdalrymple#143](jdalrymple#143)) ([395f83c](jdalrymple@395f83c)) * Add transfer a project to a new namespace ([jdalrymple#145](jdalrymple#145)) ([87e9f55](jdalrymple@87e9f55))
# [3.8.0](jdalrymple/gitbeaker@3.7.0...3.8.0) (2018-08-14) ### Bug Fixes * **api:** Updating project members all function to include the inherited members. [jdalrymple#141](jdalrymple#141) ([e081a16](jdalrymple@e081a16)) * **package:** update [@semantic-release](https://github.com/semantic-release)/npm to version 5.0.0 ([dc9748d](jdalrymple@dc9748d)) * **package:** update [@semantic-release](https://github.com/semantic-release)/npm to version 5.0.1 ([12b6ca1](jdalrymple@12b6ca1)), closes [jdalrymple#139](jdalrymple#139) * **package:** Updating packages and fixing [jdalrymple#140](jdalrymple#140) due to a babel update ([04d1769](jdalrymple@04d1769)) ### Features * Add push rule service ([jdalrymple#143](jdalrymple#143)) ([395f83c](jdalrymple@395f83c)) * Add transfer a project to a new namespace ([jdalrymple#145](jdalrymple#145)) ([87e9f55](jdalrymple@87e9f55))
…de the inherited members. #141" until properly implemented by GitLab (https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6669) This reverts commit e081a16.
# [3.11.0](3.10.1...3.11.0) (2018-08-20) ### Bug Fixes * Revert "fix(api): Updating project members all function to include the inherited members. [#141](#141)" until properly implemented by GitLab (https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6669) ([24d9bcd](24d9bcd)) ### Features * **projects:** add archive/unarchive functionality ([#168](#168)) ([5e7b1bd](5e7b1bd)), closes [#166](#166)
…de the inherited members. #141" until properly implemented by GitLab (https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6669) This reverts commit e081a16. Adding project archive abilities
@jdalrymple I guess we can add this feature again, but I would vote to fall back to the old behavior in-case where the endpoint doesn't exist. |
Hmm, its supported in the latest Gitlab version right? For older behaviour wouldnt using an older version of the package make more sense. Ill finish up merging the typescript changes and then add this change as a breaking change. At least that way it will be obvious in the changelog |
@jdalrymple Maybe a hint in the README would also be useful, that it only supports 11.2 and up. |
I would probably keep things backwards compatible and give an option to
`IncludeInherited` instead of excluding them. That way it would still work
for old versions of the API. Kind of makes sense too, because it's closer
to Gitlabs behaviour (/members Vs explicitly calling /members/all)
Max Wittig <[email protected]> schrieb am Di., 4. Sep. 2018, 07:09:
… @jdalrymple <https://github.com/jdalrymple> Maybe a hint in the README
would also be useful, that it only supports 11.2 and up.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#141 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQr6EKbSOgr2OCGGDW22Q11QUFbyLQt0ks5uXgsSgaJpZM4Vyxs3>
.
|
I agree with @MrSnoozles don't change the behavior of how it used to work otherwise this is not semantic releasing 😅 Your of course welcome to bump the version number if you were to change the behavior but I still think |
@Casz Its definitely semantic if i release a major version, though its a little extreme for this addition lol. Sounds good though, ill change it to be inclusive as opposed to exclusive! |
Well when I updated you broke my project overview, and I had to either revert or fall in line. Just to clarify my previous statement: The semvar.org clearly says:
This commit should have been marked breaking in my honest opinion, since it broke my project overview (that depended on NO inheritance), cause it broke the previous default behavior also it did not help that it was missing from the current API (but that was more of a GitLab issue 😅) |
Yea i messed it up when i first did it! I would do it properly for the next time. |
* chore(package): Update jest-extended to the latest version 🚀 0.9.0 (#191) * chore(package): update lockfile package-lock.json * feat: Re-add list all project members endpoint (#190, #141) * feat: Adding markdown support #182 (#193) * fixes: #188: `stream` option is lost in any `get` request that is streamable (#192) * feat: Added user snippets API support (#189) * chore(test): Added test for creating snippets * feat: Added user edit support #186
* chore(package): Update jest-extended to the latest version 🚀 0.9.0 (#191) * chore(package): update lockfile package-lock.json * feat: Re-add list all project members endpoint (#190, #141) * feat: Adding markdown support #182 (#193) * fixes: #188: `stream` option is lost in any `get` request that is streamable (#192) * feat: Added user snippets API support (#189) * chore(test): Added test for creating snippets * feat: Added user edit support #186
# [4.1.0](4.0.1...4.1.0) (2018-09-19) ### Features * Added user edit support [#186](#186) ([95e8999](95e8999)) * Adding markdown support [#182](#182) ([#193](#193)) ([2113e8e](2113e8e)) * Re-add list all project members endpoint ([#190](#190)) ([5b07b6a](5b07b6a)), closes [/github.com/jdalrymple/node-gitlab/commit/e081a1629f33e3af172101b94977f281879539c9#diff-379104d7d595f3793c2d7380496cc3c3](https://github.com//github.com/jdalrymple/node-gitlab/commit/e081a1629f33e3af172101b94977f281879539c9/issues/diff-379104d7d595f3793c2d7380496cc3c3) [#141](#141)
🎉 This issue has been resolved in version 4.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hello,
as far as I can see ProjectMembers.all() only returns the members added to a project but not all members. The API endpoint for this is /projects/:id/members/all instead of /projects/:id/members. The endpoint is documented here https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project-including-inherited-members
As far as I could see there is no way to retrieve all members yet. Did I maybe miss anything?
The text was updated successfully, but these errors were encountered: