diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 21:18:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 21:18:33 +0300 |
commit | f64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch) | |
tree | a2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /app/services/concerns | |
parent | bfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff) |
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'app/services/concerns')
-rw-r--r-- | app/services/concerns/alert_management/alert_processing.rb | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/app/services/concerns/alert_management/alert_processing.rb b/app/services/concerns/alert_management/alert_processing.rb index 9b15c5d7b4b..7b6f681fe3e 100644 --- a/app/services/concerns/alert_management/alert_processing.rb +++ b/app/services/concerns/alert_management/alert_processing.rb @@ -41,14 +41,21 @@ module AlertManagement end def process_resolved_alert + SystemNoteService.log_resolving_alert(alert, alert_source) + return unless auto_close_incident? - return close_issue(alert.issue) if alert.resolve(incoming_payload.ends_at) - logger.warn( - message: 'Unable to update AlertManagement::Alert status to resolved', - project_id: project.id, - alert_id: alert.id - ) + if alert.resolve(incoming_payload.ends_at) + SystemNoteService.change_alert_status(alert, User.alert_bot) + + close_issue(alert.issue) + else + logger.warn( + message: 'Unable to update AlertManagement::Alert status to resolved', + project_id: project.id, + alert_id: alert.id + ) + end end def process_firing_alert |