diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-16 12:08:20 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-16 12:08:20 +0300 |
commit | aeda2f64b45ff2bbcf2150dc75a6cbf1eec5c07f (patch) | |
tree | c88605467ffb98ead0eea6e778bbe0efc0f487a3 /app/services/alert_management | |
parent | b27cd9649fe4f7aeaffc636e42821c5b71203593 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/alert_management')
-rw-r--r-- | app/services/alert_management/create_alert_issue_service.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/services/alert_management/create_alert_issue_service.rb b/app/services/alert_management/create_alert_issue_service.rb index ab8d1176b9e..34c2003bd01 100644 --- a/app/services/alert_management/create_alert_issue_service.rb +++ b/app/services/alert_management/create_alert_issue_service.rb @@ -22,9 +22,7 @@ module AlertManagement return result unless result.success? issue = result.payload[:issue] - update_title_for(issue) - - SystemNoteService.new_alert_issue(alert, issue, user) + perform_after_create_tasks(issue) result end @@ -56,6 +54,12 @@ module AlertManagement issue.update!(title: "#{DEFAULT_INCIDENT_TITLE} #{issue.iid}") end + def perform_after_create_tasks(issue) + update_title_for(issue) + + SystemNoteService.new_alert_issue(alert, issue, user) + end + def error(message, issue = nil) ServiceResponse.error(payload: { issue: issue }, message: message) end @@ -75,3 +79,5 @@ module AlertManagement end end end + +AlertManagement::CreateAlertIssueService.prepend_mod |