Class: IncidentManagement::PagerDuty::CreateIncidentIssueService

Inherits:
BaseService
  • Object
show all
Includes:
Settings
Defined in:
app/services/incident_management/pager_duty/create_incident_issue_service.rb

Instance Attribute Summary

Attributes inherited from BaseService

#current_user, #params, #project

Instance Method Summary collapse

Methods included from Settings

#auto_close_incident?, #incident_management_setting, #process_issues?

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Methods included from BaseServiceUtility

#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level

Methods included from Gitlab::Allowable

#can?

Constructor Details

#initialize(project, incident_payload) ⇒ CreateIncidentIssueService

Returns a new instance of CreateIncidentIssueService.


8
9
10
# File 'app/services/incident_management/pager_duty/create_incident_issue_service.rb', line 8

def initialize(project, incident_payload)
  super(project, User.alert_bot, incident_payload)
end

Instance Method Details

#executeObject


12
13
14
15
16
# File 'app/services/incident_management/pager_duty/create_incident_issue_service.rb', line 12

def execute
  return forbidden unless webhook_available?

  create_incident
end