Commit 79e20891 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'sy-update-alert-incident-titles-for-http-integrations' into 'master'

Allow alert incident title to include iid for HTTP integrations

See merge request gitlab-org/gitlab!49274
parents 9a816304 f6b9b770
......@@ -263,7 +263,6 @@ module EE
def generic_alert_with_default_title?
title == ::Gitlab::AlertManagement::Payload::Generic::DEFAULT_TITLE &&
project.alerts_service_activated? &&
author == ::User.alert_bot
end
......
---
title: Include issue iid in default title for untitled incidents when created from
alert via HTTP integration
merge_request: 49274
author:
type: fixed
......@@ -30,11 +30,6 @@ RSpec.describe Issue do
context 'when issue title is "New: Incident"' do
let(:issue) { build(:issue, project: project, author: author, title: 'New: Incident', iid: 503503) }
context 'when alerts service is active' do
before do
allow(project).to receive(:alerts_service_activated?).and_return(true)
end
context 'when the author is Alert Bot' do
it 'updates issue title with the IID' do
expect { issue.save }.to change { issue.title }.to("New: Incident 503503")
......@@ -50,17 +45,6 @@ RSpec.describe Issue do
end
end
context 'when alerts service is not active' do
before do
allow(project).to receive(:alerts_service_activated?).and_return(false)
end
it 'does not change issue title' do
expect { issue.save }.not_to change { issue.title }
end
end
end
context 'when issue title is not "New: Incident"' do
let(:issue) { build(:issue, project: project, title: 'Not New: Incident') }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment