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:
authorYorick Peterse <yorickpeterse@gmail.com>2019-08-26 15:23:36 +0300
committerYorick Peterse <yorick@yorickpeterse.com>2019-08-29 17:11:42 +0300
commite8dd299e7cb4fbb622359d762089367267ed5c09 (patch)
treed4448d16374f55de345e25ec2b2d098c231c319f /lib/gitlab/slash_commands/application_help.rb
parente8bcabb4a735ecb84b5bc65269fffc21a72b6da6 (diff)
Improve chatops help output
This improves the output produced when running an unknown command, running the "help" command, and when trying to run a command you are not allowed to run. The new help output includes links to the project of the chatops integration, and a link to the chatops documentation.
Diffstat (limited to 'lib/gitlab/slash_commands/application_help.rb')
-rw-r--r--lib/gitlab/slash_commands/application_help.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gitlab/slash_commands/application_help.rb b/lib/gitlab/slash_commands/application_help.rb
index 0ea7554ba64..1a92346be15 100644
--- a/lib/gitlab/slash_commands/application_help.rb
+++ b/lib/gitlab/slash_commands/application_help.rb
@@ -3,12 +3,15 @@
module Gitlab
module SlashCommands
class ApplicationHelp < BaseCommand
- def initialize(params)
+ def initialize(project, params)
+ @project = project
@params = params
end
def execute
- Gitlab::SlashCommands::Presenters::Help.new(commands).present(trigger, params[:text])
+ Gitlab::SlashCommands::Presenters::Help
+ .new(project, commands)
+ .present(trigger, params[:text])
end
private