Commit 9c296194 authored by Nick Thomas's avatar Nick Thomas

Merge branch '6022-ee-extract-slash_commands-in-ce' into 'master'

Backport EE SlashCommand Refactor

See merge request gitlab-org/gitlab-ce!19177
parents 848ecbc7 4f20bf95
module Gitlab
module SlashCommands
class Command < BaseCommand
COMMANDS = [
def self.commands
[
Gitlab::SlashCommands::IssueShow,
Gitlab::SlashCommands::IssueNew,
Gitlab::SlashCommands::IssueSearch,
Gitlab::SlashCommands::IssueMove,
Gitlab::SlashCommands::Deploy
].freeze
]
end
def execute
command, match = match_command
......@@ -37,7 +39,7 @@ module Gitlab
private
def available_commands
COMMANDS.select do |klass|
self.class.commands.keep_if do |klass|
klass.available?(project)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment