2016-08-24 12:49:21 +05:30
|
|
|
- project = event.project
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
= icon_for_profile_event(event)
|
|
|
|
|
2014-09-02 18:07:02 +05:30
|
|
|
.event-title
|
|
|
|
%span.author_name= link_to_author event
|
2016-08-24 12:49:21 +05:30
|
|
|
%span.pushed #{event.action_name} #{event.ref_type}
|
2017-08-17 22:00:37 +05:30
|
|
|
%strong
|
2017-09-10 17:25:29 +05:30
|
|
|
- commits_link = project_commits_path(project, event.ref_name)
|
|
|
|
= link_to_if project.repository.branch_exists?(event.ref_name), 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
|
|
|
|
%ul.well-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
|
|
|
|
- if event.commits_count > 2
|
|
|
|
%span ... and #{event.commits_count - 2} more commits.
|
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
|