summaryrefslogtreecommitdiff
path: root/app/views/notify/repository_push_email.html.haml
blob: 3dd2595f1ad6ff67f512fcde8e006d9393f86ab3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
%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))}

- 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, namespace_project_commit_url(@message.project_namespace, @message.project, commit))}
        %div
          %span by #{commit.author_name}
          %i at #{commit.committed_date.to_s(:iso8601)}
        %pre.commit-message 
          = commit.safe_message

  %h4 #{pluralize @message.diffs_count, "changed file"}:

  %ul
    - @message.diffs.each_with_index do |diff, i|
      %li.file-stats
        %a{href: "#{@message.target_url if @message.disable_diffs?}#diff-#{i}" }
          - if diff.deleted_file
            %span.deleted-file
              −
              = diff.old_path
          - elsif diff.renamed_file
            = diff.old_path
            →
            = diff.new_path
          - elsif diff.new_file
            %span.new-file
              +
              = diff.new_path
          - else
            = diff.new_path

  - unless @message.disable_diffs?
    %h4 Changes:
    - @message.diffs.each_with_index do |diff, i|
      %li{id: "diff-#{i}"}
        %a{href: @message.target_url + "#diff-#{i}"}
          - if diff.deleted_file
            %strong
              = diff.old_path
            deleted
          - elsif diff.renamed_file
            %strong
              = diff.old_path
            →
            %strong
              = diff.new_path
          - else
            %strong
              = diff.new_path
        %hr
        = color_email_diff(diff.diff)
        %br

  - if @message.compare_timeout
    %h5 Huge diff. To prevent performance issues changes are hidden