From 01729005fcd5d0a25f80937d6707a232a56634b5 Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Fri, 8 Feb 2013 10:42:15 +0100 Subject: add support for notes --- gitlab.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'gitlab.py') 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'} -- cgit v1.2.1