blob: 722fcff151def0f90d6dee4f6aa964a100a258e7 (
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
29
|
# frozen_string_literal: true
module Gitlab
module SlashCommands
module IncidentManagement
class IncidentNew < IncidentCommand
def self.help_message
'incident declare'
end
def self.allowed?(project, user)
Feature.enabled?(:incident_declare_slash_command, user) && can?(user, :create_incident, project)
end
def self.match(text)
text == 'incident declare'
end
private
def presenter
Gitlab::SlashCommands::Presenters::IncidentManagement::IncidentNew.new
end
end
end
end
end
Gitlab::SlashCommands::IncidentManagement::IncidentNew.prepend_mod
|