summaryrefslogtreecommitdiff
path: root/app/mailers
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-09-26 17:18:30 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-09-26 17:18:30 +0800
commitdb6b2b18990297d98bd74af1d2f475d0d42ec443 (patch)
tree0320d3bd05b0c1ea5d9c6d5c5b6d053e0a8ae42c /app/mailers
parent8de8506d44de76af4f00ca50283ff46d005a00ab (diff)
downloadgitlab-ce-db6b2b18990297d98bd74af1d2f475d0d42ec443.tar.gz
Show open merge request against default branch if exists
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/emails/pipelines.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/mailers/emails/pipelines.rb b/app/mailers/emails/pipelines.rb
index e132105807a..2b2b7a4f08c 100644
--- a/app/mailers/emails/pipelines.rb
+++ b/app/mailers/emails/pipelines.rb
@@ -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))