Skip to content

Commit

Permalink
Implement project contributors
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauvain Pocentek committed May 8, 2016
1 parent 250f348 commit 1600770
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions gitlab/objects.py
Expand Up @@ -1512,6 +1512,21 @@ def compare(self, from_, to, **kwargs):
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.
Expand Down

0 comments on commit 1600770

Please sign in to comment.