X Tutup
Skip to content
This repository was archived by the owner on Nov 4, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions gitlab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1941,6 +1941,22 @@ def getrepositorycommit(self, project_id, sha1):
else:
return False

def getrepositorycommitcomments(self, project_id, sha1):
"""
Get the comments of a commit in a project

:param project_id: The ID of a project
:param sha1: The name of a repository branch or tag or if not given the default branch.
:return: dict of commit
"""
request = requests.get(
'{0}/{1}/repository/commits/{2}/comments'.format(self.projects_url, project_id, sha1),
verify=self.verify_ssl, auth=self.auth, headers=self.headers, timeout=self.timeout)
if request.status_code == 200:
return request.json()
else:
return False

def getrepositorycommitdiff(self, project_id, sha1):
"""
Get the diff of a commit in a project
Expand Down
X Tutup