Class: Gitlab::SlashCommands::IssueCommand

Inherits:
BaseCommand
  • Object
show all
Defined in:
lib/gitlab/slash_commands/issue_command.rb

Constant Summary

Constants inherited from BaseCommand

BaseCommand::QUERY_LIMIT

Instance Attribute Summary

Attributes inherited from BaseCommand

#chat_name, #current_user, #params, #project

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseCommand

allowed?, can?, #execute, help_message, #initialize, match

Constructor Details

This class inherits a constructor from Gitlab::SlashCommands::BaseCommand

Class Method Details

.available?(project) ⇒ Boolean

Returns:

  • (Boolean)

6
7
8
# File 'lib/gitlab/slash_commands/issue_command.rb', line 6

def self.available?(project)
  project.issues_enabled?
end

Instance Method Details

#collectionObject


10
11
12
# File 'lib/gitlab/slash_commands/issue_command.rb', line 10

def collection
  IssuesFinder.new(current_user, project_id: project.id).execute
end