debian-mirror-gitlab/lib/gitlab/slash_commands/application_help.rb
2023-01-12 18:35:48 +00:00

27 lines
535 B
Ruby

# frozen_string_literal: true
module Gitlab
module SlashCommands
class ApplicationHelp < BaseCommand
def execute
Gitlab::SlashCommands::Presenters::Help
.new(project, commands, params)
.present(trigger, params[:text])
end
private
def trigger
"#{params[:command]} [project name or alias]"
end
def commands
Gitlab::SlashCommands::Command.new(
project,
chat_name,
params
).commands
end
end
end
end