diff options
Diffstat (limited to 'lib/gitlab/chat_commands/presenters/help.rb')
-rw-r--r-- | lib/gitlab/chat_commands/presenters/help.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/gitlab/chat_commands/presenters/help.rb b/lib/gitlab/chat_commands/presenters/help.rb deleted file mode 100644 index cd47b7f4c6a..00000000000 --- a/lib/gitlab/chat_commands/presenters/help.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Gitlab - module ChatCommands - module Presenters - class Help < Presenters::Base - def present(trigger, text) - ephemeral_response(text: help_message(trigger, text)) - end - - private - - def help_message(trigger, text) - return "No commands available :thinking_face:" unless @resource.present? - - if text.start_with?('help') - header_with_list("Available commands", full_commands(trigger)) - else - header_with_list("Unknown command, these commands are available", full_commands(trigger)) - end - end - - def full_commands(trigger) - @resource.map { |command| "#{trigger} #{command.help_message}" } - end - end - end - end -end |