2019-07-07 11:18:12 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module SlashCommands
|
|
|
|
class ApplicationHelp < BaseCommand
|
2023-03-04 22:38:38 +05:30
|
|
|
def initialize(project, params)
|
|
|
|
@project = project
|
|
|
|
@params = params
|
|
|
|
end
|
|
|
|
|
2019-07-07 11:18:12 +05:30
|
|
|
def execute
|
2019-12-04 20:38:33 +05:30
|
|
|
Gitlab::SlashCommands::Presenters::Help
|
2023-01-13 00:05:48 +05:30
|
|
|
.new(project, commands, params)
|
2019-12-04 20:38:33 +05:30
|
|
|
.present(trigger, params[:text])
|
2019-07-07 11:18:12 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def trigger
|
|
|
|
"#{params[:command]} [project name or alias]"
|
|
|
|
end
|
|
|
|
|
|
|
|
def commands
|
2023-03-04 22:38:38 +05:30
|
|
|
Gitlab::SlashCommands::Command.commands
|
2019-07-07 11:18:12 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|