diff options
Diffstat (limited to 'lib/gitlab/chat_commands')
-rw-r--r-- | lib/gitlab/chat_commands/command.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/chat_commands/presenter.rb | 11 |
2 files changed, 10 insertions, 5 deletions
diff --git a/lib/gitlab/chat_commands/command.rb b/lib/gitlab/chat_commands/command.rb index c5c54cf7cfc..145086755e4 100644 --- a/lib/gitlab/chat_commands/command.rb +++ b/lib/gitlab/chat_commands/command.rb @@ -22,8 +22,6 @@ module Gitlab end end - private - def match_command match = nil service = available_commands.find do |klass| @@ -33,6 +31,8 @@ module Gitlab [service, match] end + private + def help_messages available_commands.map(&:help_message) end diff --git a/lib/gitlab/chat_commands/presenter.rb b/lib/gitlab/chat_commands/presenter.rb index e151513cbd5..c86efc0c3f8 100644 --- a/lib/gitlab/chat_commands/presenter.rb +++ b/lib/gitlab/chat_commands/presenter.rb @@ -135,9 +135,14 @@ module Gitlab def link(url, title) case format - when 'slack' then "<#{url}|#{title}>" - when 'mattermost' then "[#{title}](#{url})" - else then title + when 'slack' + "<#{url}|#{title}>" + + when 'mattermost' + "[#{title}](#{url})" + + else + title end end end |