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
8e7b75b1
Commit
8e7b75b1
authored
Jul 23, 2020
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename create_issue to create_incident
Rename methods in create incident service classes
parent
20dd843d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
app/services/alert_management/create_alert_issue_service.rb
app/services/alert_management/create_alert_issue_service.rb
+2
-2
app/services/incident_management/create_issue_service.rb
app/services/incident_management/create_issue_service.rb
+2
-2
app/services/incident_management/pager_duty/create_incident_issue_service.rb
...nt_management/pager_duty/create_incident_issue_service.rb
+2
-2
No files found.
app/services/alert_management/create_alert_issue_service.rb
View file @
8e7b75b1
...
@@ -15,7 +15,7 @@ module AlertManagement
...
@@ -15,7 +15,7 @@ module AlertManagement
return
error_no_permissions
unless
allowed?
return
error_no_permissions
unless
allowed?
return
error_issue_already_exists
if
alert
.
issue
return
error_issue_already_exists
if
alert
.
issue
result
=
create_i
ssue
result
=
create_i
ncident
return
result
unless
result
.
success?
return
result
unless
result
.
success?
issue
=
result
.
payload
[
:issue
]
issue
=
result
.
payload
[
:issue
]
...
@@ -36,7 +36,7 @@ module AlertManagement
...
@@ -36,7 +36,7 @@ module AlertManagement
user
.
can?
(
:create_issue
,
project
)
user
.
can?
(
:create_issue
,
project
)
end
end
def
create_i
ssue
def
create_i
ncident
::
IncidentManagement
::
Incidents
::
CreateService
.
new
(
::
IncidentManagement
::
Incidents
::
CreateService
.
new
(
project
,
project
,
user
,
user
,
...
...
app/services/incident_management/create_issue_service.rb
View file @
8e7b75b1
...
@@ -13,7 +13,7 @@ module IncidentManagement
...
@@ -13,7 +13,7 @@ module IncidentManagement
return
error_with
(
'setting disabled'
)
unless
incident_management_setting
.
create_issue?
return
error_with
(
'setting disabled'
)
unless
incident_management_setting
.
create_issue?
return
error_with
(
'invalid alert'
)
unless
alert
.
valid?
return
error_with
(
'invalid alert'
)
unless
alert
.
valid?
result
=
create_i
ssue
result
=
create_i
ncident
return
error_with
(
result
.
message
,
result
.
payload
[
:issue
])
unless
result
.
success?
return
error_with
(
result
.
message
,
result
.
payload
[
:issue
])
unless
result
.
success?
result
result
...
@@ -21,7 +21,7 @@ module IncidentManagement
...
@@ -21,7 +21,7 @@ module IncidentManagement
private
private
def
create_i
ssue
def
create_i
ncident
::
IncidentManagement
::
Incidents
::
CreateService
.
new
(
::
IncidentManagement
::
Incidents
::
CreateService
.
new
(
project
,
project
,
current_user
,
current_user
,
...
...
app/services/incident_management/pager_duty/create_incident_issue_service.rb
View file @
8e7b75b1
...
@@ -12,14 +12,14 @@ module IncidentManagement
...
@@ -12,14 +12,14 @@ module IncidentManagement
def
execute
def
execute
return
forbidden
unless
webhook_available?
return
forbidden
unless
webhook_available?
create_i
ssue
create_i
ncident
end
end
private
private
alias_method
:incident_payload
,
:params
alias_method
:incident_payload
,
:params
def
create_i
ssue
def
create_i
ncident
::
IncidentManagement
::
Incidents
::
CreateService
.
new
(
::
IncidentManagement
::
Incidents
::
CreateService
.
new
(
project
,
project
,
current_user
,
current_user
,
...
...
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