2023-01-13 00:05:48 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module SlashCommands
|
|
|
|
module IncidentManagement
|
|
|
|
class IncidentNew < IncidentCommand
|
|
|
|
def self.help_message
|
2023-06-20 00:43:36 +05:30
|
|
|
'incident declare *(Beta)*'
|
2023-01-13 00:05:48 +05:30
|
|
|
end
|
|
|
|
|
2023-05-27 22:25:52 +05:30
|
|
|
def self.allowed?(_project, _user)
|
|
|
|
Feature.enabled?(:incident_declare_slash_command)
|
2023-01-13 00:05:48 +05:30
|
|
|
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
|