2016-05-12 11:06:14 -04:00
|
|
|
= content_for :head do
|
|
|
|
= stylesheet_link_tag 'mailers/repository_push_email'
|
|
|
|
|
2015-11-21 14:54:19 -05:00
|
|
|
%h3
|
|
|
|
#{@message.author_name} #{@message.action_name} #{@message.ref_type} #{@message.ref_name}
|
|
|
|
at #{link_to(@message.project_name_with_namespace, namespace_project_url(@message.project_namespace, @message.project))}
|
2013-12-17 08:30:15 -05:00
|
|
|
|
2015-11-21 14:54:19 -05:00
|
|
|
- if @message.compare
|
|
|
|
- if @message.reverse_compare?
|
2015-03-17 08:55:39 -04:00
|
|
|
%p
|
|
|
|
%strong WARNING:
|
|
|
|
The push did not contain any new commits, but force pushed to delete the commits and changes below.
|
2015-02-25 09:12:19 -05:00
|
|
|
|
2015-03-17 08:55:39 -04:00
|
|
|
%h4
|
2015-11-21 14:54:19 -05:00
|
|
|
= @message.reverse_compare? ? "Deleted commits:" : "Commits:"
|
2013-12-17 08:30:15 -05:00
|
|
|
|
2015-03-17 08:55:39 -04:00
|
|
|
%ul
|
2015-11-21 14:54:19 -05:00
|
|
|
- @message.commits.each do |commit|
|
2015-03-17 08:55:39 -04:00
|
|
|
%li
|
2015-11-21 14:54:19 -05:00
|
|
|
%strong #{link_to(commit.short_id, namespace_project_commit_url(@message.project_namespace, @message.project, commit))}
|
2015-03-17 08:55:39 -04:00
|
|
|
%div
|
|
|
|
%span by #{commit.author_name}
|
2016-01-07 16:45:56 -05:00
|
|
|
%i at #{commit.committed_date.to_s(:iso8601)}
|
2016-01-29 13:37:17 -05:00
|
|
|
%pre.commit-message
|
2015-03-17 08:55:39 -04:00
|
|
|
= commit.safe_message
|
2013-12-17 08:30:15 -05:00
|
|
|
|
2015-11-21 14:54:19 -05:00
|
|
|
%h4 #{pluralize @message.diffs_count, "changed file"}:
|
2015-02-20 11:55:23 -05:00
|
|
|
|
2015-03-17 08:55:39 -04:00
|
|
|
%ul
|
2015-11-21 14:54:19 -05:00
|
|
|
- @message.diffs.each_with_index do |diff, i|
|
2015-03-17 08:55:39 -04:00
|
|
|
%li.file-stats
|
2015-11-21 14:54:19 -05:00
|
|
|
%a{href: "#{@message.target_url if @message.disable_diffs?}#diff-#{i}" }
|
2015-03-17 08:55:39 -04:00
|
|
|
- if diff.deleted_file
|
|
|
|
%span.deleted-file
|
|
|
|
−
|
|
|
|
= diff.old_path
|
|
|
|
- elsif diff.renamed_file
|
2015-02-20 11:55:23 -05:00
|
|
|
= diff.old_path
|
2015-03-17 08:55:39 -04:00
|
|
|
→
|
2015-02-20 11:55:23 -05:00
|
|
|
= diff.new_path
|
2015-03-17 08:55:39 -04:00
|
|
|
- elsif diff.new_file
|
|
|
|
%span.new-file
|
2015-05-27 09:04:18 -04:00
|
|
|
+
|
2015-03-17 08:55:39 -04:00
|
|
|
= diff.new_path
|
|
|
|
- else
|
2015-02-25 08:29:49 -05:00
|
|
|
= diff.new_path
|
2014-02-12 05:56:13 -05:00
|
|
|
|
2015-11-21 14:54:19 -05:00
|
|
|
- unless @message.disable_diffs?
|
2016-05-12 11:06:14 -04:00
|
|
|
- diff_files = @message.diffs
|
2015-03-17 08:55:39 -04:00
|
|
|
|
2016-05-12 11:06:14 -04:00
|
|
|
- if @message.compare_timeout
|
|
|
|
%h5 The diff was not included because it is too large.
|
|
|
|
- else
|
|
|
|
%h4 Changes:
|
|
|
|
- diff_files.each_with_index do |diff_file, i|
|
|
|
|
%li{id: "diff-#{i}"}
|
|
|
|
%a{href: @message.target_url + "#diff-#{i}"}<
|
|
|
|
- if diff_file.deleted_file
|
|
|
|
%strong<
|
|
|
|
= diff_file.old_path
|
|
|
|
deleted
|
|
|
|
- elsif diff_file.renamed_file
|
|
|
|
%strong<
|
|
|
|
= diff_file.old_path
|
|
|
|
→
|
|
|
|
%strong<
|
|
|
|
= diff_file.new_path
|
|
|
|
- else
|
|
|
|
%strong<
|
|
|
|
= diff_file.new_path
|
|
|
|
- if diff_file.too_large?
|
|
|
|
The diff for this file was not included because it is too large.
|
|
|
|
- else
|
|
|
|
%hr
|
2016-06-20 12:54:53 -04:00
|
|
|
- blob = diff_file.blob
|
2016-05-12 11:06:14 -04:00
|
|
|
- if blob && blob.respond_to?(:text?) && blob_text_viewable?(blob)
|
|
|
|
%table.code.white
|
|
|
|
- diff_file.highlighted_diff_lines.each do |line|
|
2016-06-20 12:54:53 -04:00
|
|
|
= render "projects/diffs/line", line: line, diff_file: diff_file, plain: true
|
2016-05-12 11:06:14 -04:00
|
|
|
- else
|
|
|
|
No preview for this file type
|
|
|
|
%br
|