summaryrefslogtreecommitdiff
path: root/app/views/notify/push_to_merge_request_email.html.haml
blob: 5197a1bdd086bde1f08bcffdeddda918a8a5c19e (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
%h3
  = sanitize_name(@updated_by_user.name)
  pushed new commits to merge request
  = merge_request_reference_link(@merge_request)

- if @total_existing_commits_count > 0
  %ul
    %li
      - if @total_existing_commits_count == 1
        - commit_id = @existing_commits.first[:short_id]
        = link_to(commit_id, project_commit_url(@merge_request.target_project, commit_id))
      - else
        = link_to(project_compare_url(@merge_request.target_project, from: @existing_commits.first[:short_id], to: @existing_commits.last[:short_id])) do
          #{@existing_commits.first[:short_id]}...#{@existing_commits.last[:short_id]}
      = precede ' - ' do
        - commits_text = "#{@total_existing_commits_count} commit".pluralize(@total_existing_commits_count)
        #{commits_text} from branch `#{@merge_request.target_branch}`

- if @total_new_commits_count > 0
  %ul
    - @new_commits.each do |commit|
      %li
        = link_to(commit[:short_id], project_commit_url(@merge_request.target_project, commit[:short_id]))
        = precede ' - ' do
          #{commit[:title]}
    - if @total_stripped_new_commits_count > 0
      %li And #{@total_stripped_new_commits_count} more