Skip to content

Commit 0172900

Browse files
author
Gauvain Pocentek
committed
add support for notes
1 parent f188dcb commit 0172900

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

gitlab.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,22 @@ class ProjectIssue(GitlabObject):
289289
returnClass = Issue
290290
canDelete = False
291291

292+
class ProjectIssueNote(GitlabObject):
293+
url = '/projects/%(project_id)d/issues/%(issue_id)d/notes'
294+
constructorTypes = {'author': 'User'}
295+
canUpdate = False
296+
canDelete = False
297+
292298
class ProjectMember(GitlabObject):
293299
url = '/projects/%(project_id)d/members'
294300
returnClass = User
295301

302+
class ProjectNote(GitlabObject):
303+
url = '/projects/%(project_id)d/notes'
304+
constructorTypes = {'author': 'User'}
305+
canUpdate = False
306+
canDelete = False
307+
296308
class ProjectTag(GitlabObject):
297309
url = '/projects/%(project_id)d/repository/tags'
298310
canGet = False
@@ -305,6 +317,14 @@ class ProjectMergeRequest(GitlabObject):
305317
constructorTypes = {'author': 'User', 'assignee': 'User'}
306318
canDelete = False
307319

320+
class ProjectMergeRequestNote(GitlabObject):
321+
url = '/projects/%(project_id)d/merge_requests/%(merge_request_id)d/notes'
322+
constructorTypes = {'author': 'User'}
323+
canGet = False
324+
canCreate = False
325+
canUpdate = False
326+
canDelete = False
327+
308328
class ProjectMilestone(GitlabObject):
309329
url = '/projects/%(project_id)s/milestones'
310330
canDelete = False
@@ -313,6 +333,12 @@ class ProjectSnippet(GitlabObject):
313333
url = '/projects/%(project_id)d/snippets'
314334
constructorTypes = {'author': 'User'}
315335

336+
class ProjectSnippetNote(GitlabObject):
337+
url = '/projects/%(project_id)d/snippets/%(snippet_id)d/notes'
338+
constructorTypes = {'author': 'User'}
339+
canUpdate = False
340+
canDelete = False
341+
316342
class Project(GitlabObject):
317343
url = '/projects'
318344
constructorTypes = {'owner': 'User', 'namespace': 'Group'}

0 commit comments

Comments
 (0)