gitlab-org--gitlab-foss/app/views/notify/repository_push_email.html.haml

81 lines
2.7 KiB
Text
Raw Normal View History

= content_for :head do
= stylesheet_link_tag 'mailers/highlighted_diff_email'
%h3
#{@message.author_name} #{@message.action_name} #{@message.ref_type} #{@message.ref_name}
at #{link_to(@message.project_name_with_namespace, project_url(@message.project))}
- if @message.compare
- if @message.reverse_compare?
%p
%strong WARNING:
The push did not contain any new commits, but force pushed to delete the commits and changes below.
%h4
= @message.reverse_compare? ? "Deleted commits:" : "Commits:"
%ul
- @message.commits.each do |commit|
%li
%strong= link_to(commit.short_id, project_commit_url(@message.project, commit))
%div
%span by #{commit.author_name}
2016-01-07 16:45:56 -05:00
%i at #{commit.committed_date.to_s(:iso8601)}
%pre.commit-message
= commit.safe_message
%h4 #{pluralize @message.diffs_count, "changed file"}:
%ul
2017-05-25 16:17:57 -04:00
- @message.diffs.each do |diff_file|
%li.file-stats
%a{ href: "#{@message.target_url if @message.disable_diffs?}##{hexdigest(diff_file.file_path)}" }
- if diff_file.deleted_file?
%span.deleted-file
−
= diff_file.old_path
- elsif diff_file.renamed_file?
= diff_file.old_path
→
= diff_file.new_path
- elsif diff_file.new_file?
%span.new-file
2015-05-27 09:04:18 -04:00
+
= diff_file.new_path
- else
= diff_file.new_path
- unless @message.disable_diffs?
- if @message.compare_timeout
%h5 The diff was not included because it is too large.
- else
%h4 Changes:
2017-05-25 16:17:57 -04:00
- @message.diffs.each do |diff_file|
- file_hash = hexdigest(diff_file.file_path)
%li{ id: file_hash }
%a{ href: @message.target_url + "##{file_hash}" }<
- if diff_file.deleted_file?
%strong<
= diff_file.old_path
deleted
- elsif diff_file.renamed_file?
%strong<
= diff_file.old_path
&rarr;
%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
2017-04-21 16:50:20 -04:00
- if blob && blob.readable_text?
%table.code.white
2016-08-18 19:27:22 -04:00
= render partial: "projects/diffs/line", collection: diff_file.highlighted_diff_lines, as: :line, locals: { diff_file: diff_file, plain: true, email: true }
- else
No preview for this file type
%br