2016-05-12 15:06:14 +00:00
|
|
|
= content_for :head do
|
2016-08-17 22:27:01 +00:00
|
|
|
= stylesheet_link_tag 'mailers/highlighted_diff_email'
|
2016-05-12 15:06:14 +00:00
|
|
|
|
2015-11-21 19:54:19 +00:00
|
|
|
%h3
|
|
|
|
#{@message.author_name} #{@message.action_name} #{@message.ref_type} #{@message.ref_name}
|
2017-06-29 17:06:35 +00:00
|
|
|
at #{link_to(@message.project_name_with_namespace, project_url(@message.project))}
|
2013-12-17 13:30:15 +00:00
|
|
|
|
2015-11-21 19:54:19 +00:00
|
|
|
- if @message.compare
|
|
|
|
- if @message.reverse_compare?
|
2015-03-17 12:55:39 +00: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 14:12:19 +00:00
|
|
|
|
2015-03-17 12:55:39 +00:00
|
|
|
%h4
|
2015-11-21 19:54:19 +00:00
|
|
|
= @message.reverse_compare? ? "Deleted commits:" : "Commits:"
|
2013-12-17 13:30:15 +00:00
|
|
|
|
2015-03-17 12:55:39 +00:00
|
|
|
%ul
|
2015-11-21 19:54:19 +00:00
|
|
|
- @message.commits.each do |commit|
|
2015-03-17 12:55:39 +00:00
|
|
|
%li
|
2017-06-29 17:06:35 +00:00
|
|
|
%strong= link_to(commit.short_id, project_commit_url(@message.project, commit))
|
2015-03-17 12:55:39 +00:00
|
|
|
%div
|
|
|
|
%span by #{commit.author_name}
|
2016-01-07 21:45:56 +00:00
|
|
|
%i at #{commit.committed_date.to_s(:iso8601)}
|
2016-01-29 18:37:17 +00:00
|
|
|
%pre.commit-message
|
2015-03-17 12:55:39 +00:00
|
|
|
= commit.safe_message
|
2013-12-17 13:30:15 +00:00
|
|
|
|
2015-11-21 19:54:19 +00:00
|
|
|
%h4 #{pluralize @message.diffs_count, "changed file"}:
|
2015-02-20 16:55:23 +00:00
|
|
|
|
2015-03-17 12:55:39 +00:00
|
|
|
%ul
|
2017-05-25 20:17:57 +00:00
|
|
|
- @message.diffs.each do |diff_file|
|
2015-03-17 12:55:39 +00:00
|
|
|
%li.file-stats
|
2017-05-15 17:10:29 +00:00
|
|
|
%a{ href: "#{@message.target_url if @message.disable_diffs?}##{hexdigest(diff_file.file_path)}" }
|
|
|
|
- if diff_file.deleted_file?
|
2015-03-17 12:55:39 +00:00
|
|
|
%span.deleted-file
|
|
|
|
−
|
2017-05-15 17:10:29 +00:00
|
|
|
= diff_file.old_path
|
|
|
|
- elsif diff_file.renamed_file?
|
|
|
|
= diff_file.old_path
|
2015-03-17 12:55:39 +00:00
|
|
|
→
|
2017-05-15 17:10:29 +00:00
|
|
|
= diff_file.new_path
|
|
|
|
- elsif diff_file.new_file?
|
2015-03-17 12:55:39 +00:00
|
|
|
%span.new-file
|
2015-05-27 13:04:18 +00:00
|
|
|
+
|
2017-05-15 17:10:29 +00:00
|
|
|
= diff_file.new_path
|
2015-03-17 12:55:39 +00:00
|
|
|
- else
|
2017-05-15 17:10:29 +00:00
|
|
|
= diff_file.new_path
|
2014-02-12 10:56:13 +00:00
|
|
|
|
2015-11-21 19:54:19 +00:00
|
|
|
- unless @message.disable_diffs?
|
2016-05-12 15:06:14 +00:00
|
|
|
- if @message.compare_timeout
|
|
|
|
%h5 The diff was not included because it is too large.
|
|
|
|
- else
|
|
|
|
%h4 Changes:
|
2017-05-25 20:17:57 +00:00
|
|
|
- @message.diffs.each do |diff_file|
|
2016-11-13 18:18:03 +00:00
|
|
|
- file_hash = hexdigest(diff_file.file_path)
|
2016-12-26 10:47:16 +00:00
|
|
|
%li{ id: file_hash }
|
|
|
|
%a{ href: @message.target_url + "##{file_hash}" }<
|
2017-05-15 17:10:29 +00:00
|
|
|
- if diff_file.deleted_file?
|
2016-05-12 15:06:14 +00:00
|
|
|
%strong<
|
|
|
|
= diff_file.old_path
|
|
|
|
deleted
|
2017-05-15 17:10:29 +00:00
|
|
|
- elsif diff_file.renamed_file?
|
2016-05-12 15:06:14 +00:00
|
|
|
%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 16:54:53 +00:00
|
|
|
- blob = diff_file.blob
|
2017-04-21 20:50:20 +00:00
|
|
|
- if blob && blob.readable_text?
|
2016-05-12 15:06:14 +00:00
|
|
|
%table.code.white
|
2022-01-11 18:16:38 +00:00
|
|
|
= render partial: "projects/diffs/email_line", collection: diff_file.highlighted_diff_lines, as: :line, locals: { diff_file: diff_file }
|
2016-05-12 15:06:14 +00:00
|
|
|
- else
|
|
|
|
No preview for this file type
|
|
|
|
%br
|