Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-14 03:06:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-14 03:06:25 +0300
commita93dfc1b7e55b118b1cf4a67afeb46556292914c (patch)
tree65b874b7940d0d05c4ebedaef43b8a1009362651 /lib/gitlab/quick_actions
parent188a57f93bba5953800de490fcc6246966a073fd (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/quick_actions')
-rw-r--r--lib/gitlab/quick_actions/issue_actions.rb43
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/gitlab/quick_actions/issue_actions.rb b/lib/gitlab/quick_actions/issue_actions.rb
index 869627ac585..7e64fe2a1f4 100644
--- a/lib/gitlab/quick_actions/issue_actions.rb
+++ b/lib/gitlab/quick_actions/issue_actions.rb
@@ -167,6 +167,49 @@ module Gitlab
issue_iid: quick_action_target.iid
}
end
+
+ desc _('Add Zoom meeting')
+ explanation _('Adds a Zoom meeting')
+ params '<Zoom URL>'
+ types Issue
+ condition do
+ zoom_link_service.can_add_link?
+ end
+ parse_params do |link|
+ zoom_link_service.parse_link(link)
+ end
+ command :zoom do |link|
+ result = zoom_link_service.add_link(link)
+
+ if result.success?
+ @updates[:description] = result.payload[:description]
+ end
+
+ @execution_message[:zoom] = result.message
+ end
+
+ desc _('Remove Zoom meeting')
+ explanation _('Remove Zoom meeting')
+ execution_message _('Zoom meeting removed')
+ types Issue
+ condition do
+ zoom_link_service.can_remove_link?
+ end
+ command :remove_zoom do
+ result = zoom_link_service.remove_link
+
+ if result.success?
+ @updates[:description] = result.payload[:description]
+ end
+
+ @execution_message[:remove_zoom] = result.message
+ end
+
+ private
+
+ def zoom_link_service
+ Issues::ZoomLinkService.new(quick_action_target, current_user)
+ end
end
end
end