1# frozen_string_literal: true
2
3module IncidentManagement
4  module Settings
5    include Gitlab::Utils::StrongMemoize
6
7    delegate :send_email?, to: :incident_management_setting
8
9    def incident_management_setting
10      strong_memoize(:incident_management_setting) do
11        project.incident_management_setting ||
12          project.build_incident_management_setting
13      end
14    end
15
16    def process_issues?
17      incident_management_setting.create_issue?
18    end
19
20    def auto_close_incident?
21      incident_management_setting.auto_close_incident?
22    end
23  end
24end
25