summaryrefslogtreecommitdiff
path: root/gitlab/objects.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r--gitlab/objects.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index 3a44f6e..9594c2b 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -1512,6 +1512,21 @@ class Project(GitlabObject):
raise_error_from_response(r, GitlabGetError)
return r.json()
+ def contributors(self):
+ """Returns a list of contributors for the project.
+
+ Returns:
+ list: The contibutors
+
+ Raises:
+ GitlabConnectionError: If the server cannot be reached.
+ GitlabGetError: If the server fails to perform the request.
+ """
+ url = "/projects/%s/repository/contributors" % self.id
+ r = self.gitlab._raw_get(url)
+ raise_error_from_response(r, GitlabListError)
+ return r.json()
+
def archive(self, sha=None, **kwargs):
"""Return a tarball of the repository.