diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2016-05-08 12:43:11 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2016-05-08 12:43:11 +0200 |
commit | 1600770e1d01aaaa90dbfd602e073e4e4a578fc1 (patch) | |
tree | 71162dcf0721fe6b6e9ab4a1fbb32bb34e2bc735 /gitlab/objects.py | |
parent | 250f34806b1414b5346b4eaf268eb2537d8017de (diff) | |
download | gitlab-1600770e1d01aaaa90dbfd602e073e4e4a578fc1.tar.gz |
Implement project contributors
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r-- | gitlab/objects.py | 15 |
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. |