2020-04-08 14:13:33 +05:30
|
|
|
# frozen_string_literal: true
|
2020-10-24 23:57:45 +05:30
|
|
|
|
2020-04-08 14:13:33 +05:30
|
|
|
module IncidentManagement
|
|
|
|
module Settings
|
2020-07-28 23:09:34 +05:30
|
|
|
include Gitlab::Utils::StrongMemoize
|
|
|
|
|
2020-10-24 23:57:45 +05:30
|
|
|
delegate :send_email?, to: :incident_management_setting
|
|
|
|
|
2020-04-08 14:13:33 +05:30
|
|
|
def incident_management_setting
|
|
|
|
strong_memoize(:incident_management_setting) do
|
|
|
|
project.incident_management_setting ||
|
|
|
|
project.build_incident_management_setting
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def process_issues?
|
|
|
|
incident_management_setting.create_issue?
|
|
|
|
end
|
2020-11-24 15:15:51 +05:30
|
|
|
|
|
|
|
def auto_close_incident?
|
|
|
|
incident_management_setting.auto_close_incident?
|
|
|
|
end
|
2020-04-08 14:13:33 +05:30
|
|
|
end
|
|
|
|
end
|