summaryrefslogtreecommitdiff
path: root/app/views/notify
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-25 15:12:19 +0100
committerDouwe Maan <douwe@gitlab.com>2015-02-25 15:12:19 +0100
commit5d86332153838252384f9f87a0ae3e34c46eb266 (patch)
tree47de3c1f04c5b2302f6269d6284d68cd29158214 /app/views/notify
parent769f137a5344dbc3748c2fea7c1d560392410ca4 (diff)
downloadgitlab-ce-5d86332153838252384f9f87a0ae3e34c46eb266.tar.gz
Send EmailsOnPush when deleting commits using force push.
See #1924.
Diffstat (limited to 'app/views/notify')
-rw-r--r--app/views/notify/repository_push_email.html.haml8
-rw-r--r--app/views/notify/repository_push_email.text.haml10
2 files changed, 14 insertions, 4 deletions
diff --git a/app/views/notify/repository_push_email.html.haml b/app/views/notify/repository_push_email.html.haml
index 1a617e2108d..039b92df2be 100644
--- a/app/views/notify/repository_push_email.html.haml
+++ b/app/views/notify/repository_push_email.html.haml
@@ -1,6 +1,12 @@
%h3 #{@author.name} pushed to #{@branch} at #{link_to @project.name_with_namespace, namespace_project_url(@project.namespace, @project)}
-%h4 Commits:
+- if @reverse_compare
+ %p
+ %strong WARNING:
+ The push did not contain any new commits, but force pushed to delete the commits and changes below.
+
+%h4
+ = @reverse_compare ? "Deleted commits:" : "Commits:"
%ul
- @commits.each do |commit|
diff --git a/app/views/notify/repository_push_email.text.haml b/app/views/notify/repository_push_email.text.haml
index 7cb2814a492..8d67a42234e 100644
--- a/app/views/notify/repository_push_email.text.haml
+++ b/app/views/notify/repository_push_email.text.haml
@@ -1,9 +1,13 @@
#{@author.name} pushed to #{@branch} at #{@project.name_with_namespace}
-
\
-Commits:
+\
+- if @reverse_compare
+ WARNING: The push did not contain any new commits, but force pushed to delete the commits and changes below.
+ \
+ \
+= @reverse_compare ? "Deleted commits:" : "Commits:"
- @commits.each do |commit|
- #{commit.short_id} by #{commit.author_name}
+ #{commit.short_id} by #{commit.author_name} at #{commit.committed_date.strftime("%Y-%m-%dT%H:%M:%SZ")}
#{commit.safe_message}
\- - - - -
\