Skip to content

Commit 80351ca

Browse files
author
Gauvain Pocentek
committed
Fix a couple listing calls to allow proper pagination
Project.repository_tree and Project.repository_contributors return lists, so use http_list to allow users to use listing features such as `all=True`. Closes #314
1 parent 7d6f3d0 commit 80351ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gitlab/v4/objects.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1815,8 +1815,8 @@ def repository_tree(self, path='', ref='', **kwargs):
18151815
query_data['path'] = path
18161816
if ref:
18171817
query_data['ref'] = ref
1818-
return self.manager.gitlab.http_get(gl_path, query_data=query_data,
1819-
**kwargs)
1818+
return self.manager.gitlab.http_list(gl_path, query_data=query_data,
1819+
**kwargs)
18201820

18211821
@cli.register_custom_action('Project', ('sha', ))
18221822
@exc.on_http_error(exc.GitlabGetError)
@@ -1904,7 +1904,7 @@ def repository_contributors(self, **kwargs):
19041904
list: The contributors
19051905
"""
19061906
path = '/projects/%s/repository/contributors' % self.get_id()
1907-
return self.manager.gitlab.http_get(path, **kwargs)
1907+
return self.manager.gitlab.http_list(path, **kwargs)
19081908

19091909
@cli.register_custom_action('Project', tuple(), ('sha', ))
19101910
@exc.on_http_error(exc.GitlabListError)

0 commit comments

Comments
 (0)