Skip to content

fix(api): Make *MemberManager.all() return a list of objects #725

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

Merged
merged 1 commit into from
Mar 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ Release notes

This page describes important changes between python-gitlab releases.

Changes from 1.8 to 1.9
=======================

* ``ProjectMemberManager.all()`` and ``GroupMemberManager.all()`` now return a
list of ``ProjectMember`` and ``GroupMember`` objects respectively, instead
of a list of dicts.

Changes from 1.7 to 1.8
=======================

Expand Down
6 changes: 4 additions & 2 deletions gitlab/v4/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,8 @@ def all(self, **kwargs):
"""

path = '%s/all' % self.path
return self.gitlab.http_list(path, **kwargs)
obj = self.gitlab.http_list(path, **kwargs)
return [self._obj_cls(self, item) for item in obj]


class GroupMergeRequest(RESTObject):
Expand Down Expand Up @@ -1955,7 +1956,8 @@ def all(self, **kwargs):
"""

path = '%s/all' % self.path
return self.gitlab.http_list(path, **kwargs)
obj = self.gitlab.http_list(path, **kwargs)
return [self._obj_cls(self, item) for item in obj]


class ProjectNote(RESTObject):
Expand Down