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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
4ad63c29
Commit
4ad63c29
authored
Sep 13, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the names and add missing check
parent
2ccd4c32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
app/models/project_services/pipelines_email_service.rb
app/models/project_services/pipelines_email_service.rb
+5
-3
No files found.
app/models/project_services/pipelines_email_service.rb
View file @
4ad63c29
...
...
@@ -7,7 +7,7 @@ class PipelinesEmailService < Service
if:
->
(
s
)
{
s
.
activated?
&&
!
s
.
add_pusher?
}
def
initialize_properties
self
.
properties
||=
{
notify_only_broken_
build
s:
true
}
self
.
properties
||=
{
notify_only_broken_
pipeline
s:
true
}
end
def
title
...
...
@@ -28,7 +28,7 @@ class PipelinesEmailService < Service
def
execute
(
data
,
force
=
false
)
return
unless
supported_events
.
include?
(
data
[
:object_kind
])
return
unless
force
||
should_
build
_be_notified?
(
data
)
return
unless
force
||
should_
pipeline
_be_notified?
(
data
)
all_recipients
=
retrieve_recipients
(
data
)
...
...
@@ -73,10 +73,12 @@ class PipelinesEmailService < Service
{
success:
false
,
result:
error
}
end
def
should_
build
_be_notified?
(
data
)
def
should_
pipeline
_be_notified?
(
data
)
case
data
[
:object_attributes
][
:status
]
when
'success'
!
notify_only_broken_pipelines?
when
'failed'
true
else
false
end
...
...
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