Skip to content

Commit 3ecf13e

Browse files
committed
API MergeRequest.get_commits, Project.get_comments
Add new API actions for retrieving commits belonging to a merge request and commit comments.
1 parent 9d12a0f commit 3ecf13e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

gitlab3/_api_definition.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ class GetBlobAction(ExtraActionDefinition):
168168
required_params = [
169169
'filepath',
170170
]
171+
class GetCommentsAction(ExtraActionDefinition):
172+
"""gl.Project.get_comments"""
173+
url = '/repository/commits/:sha_or_ref_name/comments'
174+
method = _HTTP_GET
171175
class ProtectBranchAction(ExtraActionDefinition):
172176
"""gl.Project.protect_branch()"""
173177
url = '/repository/branches/:branch/protect'
@@ -203,6 +207,7 @@ def wrapped(self, branch):
203207
ForkFromAction,
204208
DeleteForkAction,
205209
GetBlobAction,
210+
GetCommentsAction,
206211
ProtectBranchAction,
207212
UnprotectBranchAction,
208213
]
@@ -306,8 +311,12 @@ class PostCommentAction(ExtraActionDefinition):
306311
required_args = [
307312
'note',
308313
]
314+
class GetCommitsAction(ExtraActionDefinition):
315+
"""gl.Project.MergeRequest.get_commits()"""
316+
url = '/commits'
317+
method = _HTTP_GET
309318

310-
extra_actions = [ PostCommentAction ]
319+
extra_actions = [ PostCommentAction, GetCommitsAction ]
311320
sub_apis = [ Note ]
312321

313322
class Milestone(APIDefinition):

0 commit comments

Comments
 (0)