summaryrefslogtreecommitdiff
path: root/app/views/notify
diff options
context:
space:
mode:
authorlulalala <mark@goodlife.tw>2018-05-09 17:49:33 +0800
committerMark Chao <mchao@gitlab.com>2018-05-17 08:54:51 +0800
commitdc174e9655267e89e1b7c63f8c9f4dac069069c7 (patch)
tree33cebe2481870434098f88f253090f2de91b873d /app/views/notify
parent179a1ee7c669e758f8dc9fb5e9c8f2563012a6e1 (diff)
downloadgitlab-ce-dc174e9655267e89e1b7c63f8c9f4dac069069c7.tar.gz
Notify with email when merge request became unmergeable
Display MR unmergeable reasons
Diffstat (limited to 'app/views/notify')
-rw-r--r--app/views/notify/merge_request_unmergeable_email.html.haml6
-rw-r--r--app/views/notify/merge_request_unmergeable_email.text.haml11
2 files changed, 17 insertions, 0 deletions
diff --git a/app/views/notify/merge_request_unmergeable_email.html.haml b/app/views/notify/merge_request_unmergeable_email.html.haml
new file mode 100644
index 00000000000..f51a31c0eda
--- /dev/null
+++ b/app/views/notify/merge_request_unmergeable_email.html.haml
@@ -0,0 +1,6 @@
+%p
+ Merge Request #{link_to @merge_request.to_reference, project_merge_request_url(@merge_request.target_project, @merge_request)} can no longer be merged due to the following reason(s):
+
+ %ul
+ - @merge_request_presenter.unmergeable_reasons.each do |reason|
+ %li= reason
diff --git a/app/views/notify/merge_request_unmergeable_email.text.haml b/app/views/notify/merge_request_unmergeable_email.text.haml
new file mode 100644
index 00000000000..2acf0de34fc
--- /dev/null
+++ b/app/views/notify/merge_request_unmergeable_email.text.haml
@@ -0,0 +1,11 @@
+Merge Request #{@merge_request.to_reference} can no longer be merged due to the following reason(s):
+
+- @merge_request_presenter.unmergeable_reasons.each do |reason|
+ * #{reason}
+
+Merge Request url: #{project_merge_request_url(@merge_request.target_project, @merge_request)}
+
+= merge_path_description(@merge_request, 'to')
+
+Author: #{@merge_request.author_name}
+Assignee: #{@merge_request.assignee_name}