Welcome to mirror list, hosted at ThFree Co, Russian Federation.

application_help.rb « slash_commands « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bfdb65a816d601ce7c1b2ed90e135b14f1937f4a (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
# 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