debian-mirror-gitlab/app/views/events/event/_push.html.haml

46 lines
1.7 KiB
Text
Raw Normal View History

2016-08-24 12:49:21 +05:30
- project = event.project
2017-08-17 22:00:37 +05:30
= icon_for_profile_event(event)
2018-12-13 13:39:08 +05:30
= event_user_info(event)
.event-title.d-flex.flex-wrap
= inline_event_icon(event)
%span.event-type.d-inline-block.append-right-4.pushed #{event.action_name} #{event.ref_type}
%span.append-right-4
2017-09-10 17:25:29 +05:30
- commits_link = project_commits_path(project, event.ref_name)
2018-03-17 18:26:18 +05:30
- should_link = event.tag? ? project.repository.tag_exists?(event.ref_name) : project.repository.branch_exists?(event.ref_name)
= link_to_if should_link, event.ref_name, commits_link, class: 'ref-name'
2016-08-24 12:49:21 +05:30
= render "events/event_scope", event: event
2014-09-02 18:07:02 +05:30
- if event.push_with_commits?
.event-body
2018-11-08 19:23:39 +05:30
%ul.content-list.event_commits
2017-09-10 17:25:29 +05:30
= render "events/commit", project: project, event: event
2014-09-02 18:07:02 +05:30
2017-08-17 22:00:37 +05:30
- create_mr = event.new_ref? && create_mr_button?(project.default_branch, event.ref_name, project) && event.authored_by?(current_user)
2014-09-02 18:07:02 +05:30
- if event.commits_count > 1
%li.commits-stat
2018-03-17 18:26:18 +05:30
%span ... and #{pluralize(event.commits_count - 1, 'more commit')}.
2015-09-11 14:41:01 +05:30
2015-04-26 12:48:37 +05:30
- if event.md_ref?
- from = event.commit_from
- from_label = truncate_sha(from)
- else
2016-08-24 12:49:21 +05:30
- from = project.default_branch
2015-04-26 12:48:37 +05:30
- from_label = from
2015-09-11 14:41:01 +05:30
2017-09-10 17:25:29 +05:30
= link_to project_compare_path(project, from: from, to: event.commit_to) do
2015-09-11 14:41:01 +05:30
Compare #{from_label}...#{truncate_sha(event.commit_to)}
- if create_mr
2017-08-17 22:00:37 +05:30
%span
2015-09-11 14:41:01 +05:30
or
2016-08-24 12:49:21 +05:30
= link_to create_mr_path(project.default_branch, event.ref_name, project) do
2015-09-11 14:41:01 +05:30
create a merge request
- elsif create_mr
2017-08-17 22:00:37 +05:30
%li.commits-stat
2016-08-24 12:49:21 +05:30
= link_to create_mr_path(project.default_branch, event.ref_name, project) do
2015-09-11 14:41:01 +05:30
Create Merge Request