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>2023-02-03 00:07:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-03 00:07:46 +0300
commit9579eee8954e0405c2dadb19c2a73c9597ce37ea (patch)
treed90223b7e449d8d25eef60ad16084ce0d2ca2b1b /lib/gitlab/quick_actions
parent0a9b6b99a9bdcacea434501320f1a8d131a33827 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/quick_actions')
-rw-r--r--lib/gitlab/quick_actions/command_definition.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/quick_actions/command_definition.rb b/lib/gitlab/quick_actions/command_definition.rb
index d9135d1bacb..118c8aad460 100644
--- a/lib/gitlab/quick_actions/command_definition.rb
+++ b/lib/gitlab/quick_actions/command_definition.rb
@@ -149,7 +149,13 @@ module Gitlab
end
def valid_type?(context)
- types.blank? || types.any? { |type| context.quick_action_target.is_a?(type) }
+ types.blank? || types.any? do |type|
+ if context.quick_action_target.is_a?(WorkItem)
+ context.quick_action_target.supported_quick_action_commands.include?(name.to_sym)
+ else
+ context.quick_action_target.is_a?(type)
+ end
+ end
end
end
end