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