1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

gitlab_group_members/gitlab_project_members - fix pagination issue (#3054) (#3061)

* Fix

* fixed linter stuff

* typo in section name of changlog fragment

Co-authored-by: Max Bidlingmaier <Max-Florian.Bidlingmaier@sap.com>
(cherry picked from commit d057b2e3b2)

Co-authored-by: Max Bidlingmaier <maks@konsolan.de>
This commit is contained in:
patchback[bot] 2021-07-24 21:24:18 +02:00 committed by GitHub
parent 172e8bb161
commit c5f17f2184
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View file

@ -0,0 +1,3 @@
bugfixes:
- gitlab_group_members - fixes issue when gitlab group has more then 20 members, pagination problem (https://github.com/ansible-collections/community.general/issues/3041).
- gitlab_project_members - fixes issue when gitlab group has more then 20 members, pagination problem (https://github.com/ansible-collections/community.general/issues/3041).

View file

@ -109,7 +109,7 @@ class GitLabGroup(object):
# get all members in a group
def get_members_in_a_group(self, gitlab_group_id):
group = self._gitlab.groups.get(gitlab_group_id)
return group.members.list()
return group.members.list(all=True)
# check if the user is a member of the group
def is_user_a_member(self, members, gitlab_user_id):

View file

@ -130,7 +130,7 @@ class GitLabProjectMembers(object):
# get all members in a project
def get_members_in_a_project(self, gitlab_project_id):
project = self._gitlab.projects.get(gitlab_project_id)
return project.members.list()
return project.members.list(all=True)
# check if the user is a member of the project
def is_user_a_member(self, members, gitlab_user_id):