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:
Diffstat (limited to 'lib/gitlab/quick_actions/dsl.rb')
-rw-r--r--lib/gitlab/quick_actions/dsl.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/gitlab/quick_actions/dsl.rb b/lib/gitlab/quick_actions/dsl.rb
index 5abbd377642..a2dfcc6de9a 100644
--- a/lib/gitlab/quick_actions/dsl.rb
+++ b/lib/gitlab/quick_actions/dsl.rb
@@ -33,8 +33,12 @@ module Gitlab
@description = block_given? ? block : text
end
- def warning(message = '')
- @warning = message
+ def warning(text = '', &block)
+ @warning = block_given? ? block : text
+ end
+
+ def icon(string = '')
+ @icon = string
end
# Allows to define params for the next quick action.
@@ -192,6 +196,7 @@ module Gitlab
aliases: aliases,
description: @description,
warning: @warning,
+ icon: @icon,
explanation: @explanation,
execution_message: @execution_message,
params: @params,
@@ -213,6 +218,7 @@ module Gitlab
@params = nil
@condition_block = nil
@warning = nil
+ @icon = nil
@parse_params_block = nil
@types = nil
end