X Tutup
Skip to content

Commit f4ee128

Browse files
committed
Add support for fork listing from the fork manager
1 parent 35c8c82 commit f4ee128

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gitlab/v4/objects.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1645,7 +1645,7 @@ class ProjectFork(RESTObject):
16451645
pass
16461646

16471647

1648-
class ProjectForkManager(CreateMixin, RESTManager):
1648+
class ProjectForkManager(CreateMixin, ListMixin, RESTManager):
16491649
_path = '/projects/%(project_id)s/fork'
16501650
_obj_cls = ProjectFork
16511651
_from_parent_attrs = {'project_id': 'id'}
@@ -1654,7 +1654,9 @@ class ProjectForkManager(CreateMixin, RESTManager):
16541654
'with_custom_attributes', 'with_issues_enabled',
16551655
'with_merge_requests_enabled')
16561656
_create_attrs = (tuple(), ('namespace', ))
1657-
1657+
1658+
def list(self, **kwargs):
1659+
return super().list(path=self._compute_path(path=(self._path + "s")), **kwargs)
16581660

16591661
class ProjectHook(SaveMixin, ObjectDeleteMixin, RESTObject):
16601662
_short_print_attr = 'url'

0 commit comments

Comments
 (0)
X Tutup