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
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-03-04 12:21:47 +0300
committerSean McGivern <sean@gitlab.com>2019-03-04 12:21:47 +0300
commitd4a2cd793992f96a24170a4d356f7849cf10e9cb (patch)
treed0dd8c328bb0c7ce2311c79f525f7f23db9e0ff0 /lib
parent4b0036b87ee30ce0a3687dd052514b571f4d520f (diff)
parent78dc1b58a64be03e6d3622aab5605e1d5f6a6643 (diff)
Merge branch 'ce-issue_8844' into 'master'
[CE Backport] Show commands applied message when promoting issues to epics See merge request gitlab-org/gitlab-ce!25685
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/quick_actions/command_definition.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/gitlab/quick_actions/command_definition.rb b/lib/gitlab/quick_actions/command_definition.rb
index 259345b8a9a..e7bfcb16582 100644
--- a/lib/gitlab/quick_actions/command_definition.rb
+++ b/lib/gitlab/quick_actions/command_definition.rb
@@ -48,6 +48,8 @@ module Gitlab
def execute(context, arg)
return if noop? || !available?(context)
+ count_commands_executed_in(context)
+
execute_block(action_block, context, arg)
end
@@ -73,6 +75,13 @@ module Gitlab
private
+ def count_commands_executed_in(context)
+ return unless context.respond_to?(:commands_executed_count=)
+
+ context.commands_executed_count ||= 0
+ context.commands_executed_count += 1
+ end
+
def execute_block(block, context, arg)
if arg.present?
parsed = parse_params(arg, context)