summaryrefslogtreecommitdiff
path: root/gitlab.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab.py')
-rw-r--r--gitlab.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/gitlab.py b/gitlab.py
index a7ec487..4ab1156 100644
--- a/gitlab.py
+++ b/gitlab.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Gauvain Pocentek <gauvain@pocentek.net>
@@ -610,9 +609,9 @@ class GitlabObject(object):
class UserKey(GitlabObject):
_url = '/users/%(user_id)s/keys'
canGet = False
- canList = False
+ canList = True
canUpdate = False
- canDelete = False
+ canDelete = True
requiredCreateAttrs = ['user_id', 'title', 'key']
@@ -706,11 +705,11 @@ class Issue(GitlabObject):
class ProjectBranch(GitlabObject):
_url = '/projects/%(project_id)s/repository/branches'
idAttr = 'name'
- canDelete = False
canUpdate = False
- canCreate = False
requiredGetAttrs = ['project_id']
requiredListAttrs = ['project_id']
+ requiredCreateAttrs = ['project_id', 'branch_name', 'ref']
+ requiredDeleteAttrs = ['project_id']
_constructorTypes = {'commit': 'ProjectCommit'}
def protect(self, protect=True):
@@ -876,7 +875,7 @@ class ProjectMilestone(GitlabObject):
requiredListAttrs = ['project_id']
requiredGetAttrs = ['project_id']
requiredCreateAttrs = ['project_id', 'title']
- optionalCreateAttrs = ['description', 'due_date']
+ optionalCreateAttrs = ['description', 'due_date', 'state_event']
shortPrintAttr = 'title'