BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
db6b2b18
Commit
db6b2b18
authored
Sep 26, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show open merge request against default branch if exists
parent
8de8506d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
pipelines.rb
app/mailers/emails/pipelines.rb
+4
-0
pipeline_failed_email.html.haml
app/views/notify/pipeline_failed_email.html.haml
+4
-3
No files found.
app/mailers/emails/pipelines.rb
View file @
db6b2b18
...
...
@@ -13,6 +13,10 @@ module Emails
def
pipeline_mail
(
pipeline
,
to
,
status
)
@project
=
pipeline
.
project
@pipeline
=
pipeline
@merge_request
=
@project
.
merge_requests
.
opened
.
find_by
(
source_project:
@project
,
source_branch:
@pipeline
.
ref
,
target_branch:
@project
.
default_branch
)
add_headers
mail
(
to:
to
,
subject:
pipeline_subject
(
status
))
...
...
app/views/notify/pipeline_failed_email.html.haml
View file @
db6b2b18
...
...
@@ -94,9 +94,10 @@
%td
{
:style
=>
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;vertical-align:middle;"
}
%a
.muted
{
:href
=>
namespace_project_commits_url
(
@project
.
namespace
,
@project
,
@pipeline
.
ref
),
:style
=>
"color:#333333;text-decoration:none;"
}
=
@pipeline
.
ref
(
%a
{
:href
=>
"{{{merge-request-link}}}"
,
:style
=>
"color:#3084bb;text-decoration:none;white-space: nowrap;"
}>
merge request
)
-
if
@merge_request
(
%a
{
:href
=>
namespace_project_merge_request_url
(
@project
.
namespace
,
@project
,
@merge_request
),
:style
=>
"color:#3084bb;text-decoration:none;white-space: nowrap;"
}>
merge request
)
%tr
%td
{
:style
=>
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#8c8c8c;font-weight:300;padding:14px 0;margin:0;border-top:1px solid #ededed;"
}
Commit
%td
{
:style
=>
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#8c8c8c;font-weight:300;padding:14px 0;margin:0;color:#333333;font-weight:400;width:75%;padding-left:5px;border-top:1px solid #ededed;"
}
...
...
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