summaryrefslogtreecommitdiff
path: root/lib/gitlab/quick_actions
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/quick_actions')
-rw-r--r--lib/gitlab/quick_actions/issue_actions.rb22
1 files changed, 7 insertions, 15 deletions
diff --git a/lib/gitlab/quick_actions/issue_actions.rb b/lib/gitlab/quick_actions/issue_actions.rb
index 404e0c31871..838aefb59f0 100644
--- a/lib/gitlab/quick_actions/issue_actions.rb
+++ b/lib/gitlab/quick_actions/issue_actions.rb
@@ -174,18 +174,14 @@ module Gitlab
params '<Zoom URL>'
types Issue
condition do
- zoom_link_service.can_add_link?
+ @zoom_service = zoom_link_service
+ @zoom_service.can_add_link?
end
parse_params do |link|
- zoom_link_service.parse_link(link)
+ @zoom_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
-
+ result = @zoom_service.add_link(link)
@execution_message[:zoom] = result.message
end
@@ -194,15 +190,11 @@ module Gitlab
execution_message _('Zoom meeting removed')
types Issue
condition do
- zoom_link_service.can_remove_link?
+ @zoom_service = zoom_link_service
+ @zoom_service.can_remove_link?
end
command :remove_zoom do
- result = zoom_link_service.remove_link
-
- if result.success?
- @updates[:description] = result.payload[:description]
- end
-
+ result = @zoom_service.remove_link
@execution_message[:remove_zoom] = result.message
end