summaryrefslogtreecommitdiff
path: root/gitlab/cli.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2016-06-19 20:27:41 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2016-06-19 20:27:41 +0200
commit73627a21bc94d6c37adaa36ef3ab0475a05a46f3 (patch)
tree3c2fb68d5897f60f16ba27a81deaf9067d0b1cfc /gitlab/cli.py
parentca68f6de561cbe5f1e528260eff30ff5943cd39e (diff)
downloadgitlab-73627a21bc94d6c37adaa36ef3ab0475a05a46f3.tar.gz
Add support for project-issue move
Diffstat (limited to 'gitlab/cli.py')
-rw-r--r--gitlab/cli.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py
index bbd2ac4..bc17915 100644
--- a/gitlab/cli.py
+++ b/gitlab/cli.py
@@ -44,7 +44,9 @@ EXTRA_ACTIONS = {
'filepath']},
'builds': {'required': ['id', 'project-id']}},
gitlab.ProjectIssue: {'subscribe': {'required': ['id', 'project-id']},
- 'unsubscribe': {'required': ['id', 'project-id']}},
+ 'unsubscribe': {'required': ['id', 'project-id']},
+ 'move': {'required': ['id', 'project-id',
+ 'to-project-id']}},
gitlab.ProjectMergeRequest: {
'closes-issues': {'required': ['id', 'project-id']},
'cancel': {'required': ['id', 'project-id']},
@@ -280,6 +282,13 @@ class GitlabCLI(object):
except Exception as e:
_die("Impossible to subscribe to issue (%s)" % str(e))
+ def do_project_issue_move(self, cls, gl, what, args):
+ try:
+ o = self.do_get(cls, gl, what, args)
+ o.move(args['to_project_id'])
+ except Exception as e:
+ _die("Impossible to move issue (%s)" % str(e))
+
def do_project_merge_request_closesissues(self, cls, gl, what, args):
try:
o = self.do_get(cls, gl, what, args)