Fix issues with push 600+ commits. refactored, improved push events
This commit is contained in:
parent
eb2c1cd2e3
commit
897da534fa
9 changed files with 72 additions and 45 deletions
|
@ -24,7 +24,7 @@
|
|||
|
||||
|
||||
- unless @commits.empty?
|
||||
%h4 Commits
|
||||
%h4 Commits (#{@commits.count})
|
||||
%ul.unstyled= render @commits
|
||||
|
||||
- unless @diffs.empty?
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
- if @last_push && @last_push.valid_push?
|
||||
.padded.prepend-top-20
|
||||
%h5
|
||||
%small Latest push was to the #{@last_push.branch_name} branch of #{@last_push.project.name}:
|
||||
%small Latest push was to the #{@last_push.ref_name} #{@last_push.ref_type} of #{@last_push.project.name}:
|
||||
%ul.unstyled= render @last_push
|
||||
|
||||
- if @merge_requests.any?
|
||||
|
|
|
@ -11,17 +11,17 @@
|
|||
ago.
|
||||
|
||||
- if event.push_with_commits?
|
||||
- if event.commits.count > 1
|
||||
- if event.commits_count > 1
|
||||
= link_to compare_project_commits_path(event.project, :from => event.parent_commit.id, :to => event.last_commit.id) do
|
||||
%strong #{event.commits.first.id[0..7]}...#{event.last_commit.id[0..7]}
|
||||
%strong #{event.parent_commit.id[0..7]}...#{event.last_commit.id[0..7]}
|
||||
- project = event.project
|
||||
%ul.unstyled.event_commits
|
||||
- if event.commits.size > 3
|
||||
- if event.commits_count > 3
|
||||
- event.commits[0...2].each do |commit|
|
||||
= render "events/commit", :commit => commit, :project => project
|
||||
%li
|
||||
%br
|
||||
\... and #{event.commits.size - 2} more commits
|
||||
\... and #{event.commits_count - 2} more commits
|
||||
- else
|
||||
- event.commits.each do |commit|
|
||||
= render "events/commit", :commit => commit, :project => project
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue