Class: Gitlab::SlashCommands::IncidentManagement::IncidentCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Gitlab::SlashCommands::IncidentManagement::IncidentCommand
- Defined in:
- lib/gitlab/slash_commands/incident_management/incident_command.rb
Direct Known Subclasses
Constant Summary
Constants inherited from BaseCommand
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
7 8 9 |
# File 'lib/gitlab/slash_commands/incident_management/incident_command.rb', line 7 def self.available?(project) true end |
Instance Method Details
#collection ⇒ Object
11 12 13 |
# File 'lib/gitlab/slash_commands/incident_management/incident_command.rb', line 11 def collection IssuesFinder.new(current_user, project_id: project.id, issue_types: :incident).execute end |
#slack_installation ⇒ Object
15 16 17 18 19 |
# File 'lib/gitlab/slash_commands/incident_management/incident_command.rb', line 15 def slack_installation slack_workspace_id = params[:team_id] SlackIntegration.with_bot.find_by_team_id(slack_workspace_id) end |