summaryrefslogtreecommitdiff
path: root/gitlab/v3/cli.py
diff options
context:
space:
mode:
authorEric Sabouraud <esabouraud@users.noreply.github.com>2018-02-28 16:02:12 +0100
committerEric Sabouraud <esabouraud@users.noreply.github.com>2018-02-28 16:02:12 +0100
commitc8c4b4262113860b61318706b913f45634279ec6 (patch)
treefd6ab9ffffd560a200cc5eb7f36b0d10ef15ed96 /gitlab/v3/cli.py
parent5fdd06e1ee57e42a746aefcb96d819c0ed7835bf (diff)
downloadgitlab-c8c4b4262113860b61318706b913f45634279ec6.tar.gz
Add support for unsharing projects to v3 API (untested)
Diffstat (limited to 'gitlab/v3/cli.py')
-rw-r--r--gitlab/v3/cli.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/gitlab/v3/cli.py b/gitlab/v3/cli.py
index a8e3a5f..94fa03c 100644
--- a/gitlab/v3/cli.py
+++ b/gitlab/v3/cli.py
@@ -69,6 +69,7 @@ EXTRA_ACTIONS = {
'archive': {'required': ['id']},
'unarchive': {'required': ['id']},
'share': {'required': ['id', 'group-id', 'group-access']},
+ 'unshare': {'required': ['id', 'group-id']},
'upload': {'required': ['id', 'filename', 'filepath']}},
gitlab.v3.objects.User: {
'block': {'required': ['id']},
@@ -213,6 +214,13 @@ class GitlabCLI(object):
except Exception as e:
cli.die("Impossible to share project", e)
+ def do_project_unshare(self, cls, gl, what, args):
+ try:
+ o = self.do_get(cls, gl, what, args)
+ o.unshare(args['group_id'])
+ except Exception as e:
+ cli.die("Impossible to unshare project", e)
+
def do_user_block(self, cls, gl, what, args):
try:
o = self.do_get(cls, gl, what, args)