summaryrefslogtreecommitdiff
path: root/gitlab.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2013-02-08 10:42:15 +0100
committerGauvain Pocentek <gauvain@pocentek.net>2013-02-08 10:42:15 +0100
commit01729005fcd5d0a25f80937d6707a232a56634b5 (patch)
tree109afbf8b8865e4b05ca0d5cf5afd56bc9ceca75 /gitlab.py
parentf188dcb5eda4f5b638356501687477f0cc0177e9 (diff)
downloadgitlab-01729005fcd5d0a25f80937d6707a232a56634b5.tar.gz
add support for notes
Diffstat (limited to 'gitlab.py')
-rw-r--r--gitlab.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/gitlab.py b/gitlab.py
index 7820736..d71fbbc 100644
--- a/gitlab.py
+++ b/gitlab.py
@@ -289,10 +289,22 @@ class ProjectIssue(GitlabObject):
returnClass = Issue
canDelete = False
+class ProjectIssueNote(GitlabObject):
+ url = '/projects/%(project_id)d/issues/%(issue_id)d/notes'
+ constructorTypes = {'author': 'User'}
+ canUpdate = False
+ canDelete = False
+
class ProjectMember(GitlabObject):
url = '/projects/%(project_id)d/members'
returnClass = User
+class ProjectNote(GitlabObject):
+ url = '/projects/%(project_id)d/notes'
+ constructorTypes = {'author': 'User'}
+ canUpdate = False
+ canDelete = False
+
class ProjectTag(GitlabObject):
url = '/projects/%(project_id)d/repository/tags'
canGet = False
@@ -305,6 +317,14 @@ class ProjectMergeRequest(GitlabObject):
constructorTypes = {'author': 'User', 'assignee': 'User'}
canDelete = False
+class ProjectMergeRequestNote(GitlabObject):
+ url = '/projects/%(project_id)d/merge_requests/%(merge_request_id)d/notes'
+ constructorTypes = {'author': 'User'}
+ canGet = False
+ canCreate = False
+ canUpdate = False
+ canDelete = False
+
class ProjectMilestone(GitlabObject):
url = '/projects/%(project_id)s/milestones'
canDelete = False
@@ -313,6 +333,12 @@ class ProjectSnippet(GitlabObject):
url = '/projects/%(project_id)d/snippets'
constructorTypes = {'author': 'User'}
+class ProjectSnippetNote(GitlabObject):
+ url = '/projects/%(project_id)d/snippets/%(snippet_id)d/notes'
+ constructorTypes = {'author': 'User'}
+ canUpdate = False
+ canDelete = False
+
class Project(GitlabObject):
url = '/projects'
constructorTypes = {'owner': 'User', 'namespace': 'Group'}