blob: 94abc8b450886751e297a39ba871b6cb690d16dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# frozen_string_literal: true
module Gitlab
module SlashCommands
class ApplicationHelp < BaseCommand
def initialize(project, params)
@project = project
@params = params
end
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.commands
end
end
end
end
|