Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c938349f
Commit
c938349f
authored
Oct 28, 2020
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs and syntax
- Add changlog
parent
7e70ed4c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
6 deletions
+10
-6
app/models/project_services/alerts_service.rb
app/models/project_services/alerts_service.rb
+1
-1
app/services/alert_management/sync_alert_service_data_service.rb
...vices/alert_management/sync_alert_service_data_service.rb
+3
-4
changelogs/unreleased/255519-migrate-existing-generic-alert-endpoints-to-http-integrations-form.yml
...ing-generic-alert-endpoints-to-http-integrations-form.yml
+5
-0
spec/services/alert_management/sync_alert_service_data_service_spec.rb
.../alert_management/sync_alert_service_data_service_spec.rb
+1
-1
No files found.
app/models/project_services/alerts_service.rb
View file @
c938349f
...
...
@@ -81,7 +81,7 @@ class AlertsService < Service
end
def
update_http_integration
return
unless
type
==
'AlertsService'
return
unless
project_id
&&
type
==
'AlertsService'
AlertManagement
::
SyncAlertServiceDataService
# rubocop: disable CodeReuse/ServiceClass
.
new
(
self
)
...
...
app/services/alert_management/sync_alert_service_data_service.rb
View file @
c938349f
...
...
@@ -2,7 +2,6 @@
module
AlertManagement
class
SyncAlertServiceDataService
# @param alert_service [AlertsService]
def
initialize
(
alert_service
)
@alert_service
=
alert_service
...
...
@@ -23,9 +22,9 @@ module AlertManagement
def
find_http_integration
AlertManagement
::
HttpIntegrationsFinder
.
new
(
alert_service
.
project
,
endpoint_identifier:
::
AlertManagement
::
HttpIntegration
::
LEGACY_IDENTIFIER
)
alert_service
.
project
,
endpoint_identifier:
::
AlertManagement
::
HttpIntegration
::
LEGACY_IDENTIFIER
)
.
execute
.
first
end
...
...
changelogs/unreleased/255519-migrate-existing-generic-alert-endpoints-to-http-integrations-form.yml
0 → 100644
View file @
c938349f
---
title
:
Migrate Alert Service to HTTP Integrations model
merge_request
:
46188
author
:
type
:
added
spec/services/alert_management/sync_alert_service_data_service_spec.rb
View file @
c938349f
...
...
@@ -25,7 +25,7 @@ RSpec.describe AlertManagement::SyncAlertServiceDataService do
end
context
'existing other http integration'
do
let_it_be
(
:integration
)
{
create
(
:alert_management_http_integration
,
project:
alerts_service
.
project
)
}
let_it_be
(
:integration
)
{
create
(
:alert_management_http_integration
,
project:
alerts_service
.
project
)
}
it
'does not update the integration'
do
expect
{
subject
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment