Skip to content

Commit d4e2cd6

Browse files
Kris GambirazziKris Gambirazzi
Kris Gambirazzi
authored and
Kris Gambirazzi
committed
list projects under group
1 parent 61bc24f commit d4e2cd6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

gitlab/objects.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,19 @@ def search(self, query, **kwargs):
717717
url = '/groups?search=' + query
718718
return self.gitlab._raw_list(url, self.obj_cls, **kwargs)
719719

720+
def list_projects(self, gid, **kwargs):
721+
"""List all projects in a group
722+
723+
Attrs:
724+
gid (int): ID of the group
725+
726+
Raises:
727+
GitlabConnectionError: if the server cannot be reached.
728+
GitlabListError: If the server fails to perform the request.
729+
"""
730+
url = '/groups/%d/projects' % gid
731+
return self.gitlab._raw_list(url, self.obj_cls, **kwargs)
732+
720733

721734
class Hook(GitlabObject):
722735
_url = '/hooks'

0 commit comments

Comments
 (0)