Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-10-05 22:20:54 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2015-10-05 22:20:54 +0300
commitfc795d6ee2bdc1229f82c535222752364b5c9e44 (patch)
treeaa430acc42f5314a8af2fd7c3ab288df37abe1d0 /app/controllers/ci
parente5e6c846ead9ea4cacc53c2308c5ca86ce1ab766 (diff)
Fix graphical glitches
Diffstat (limited to 'app/controllers/ci')
-rw-r--r--app/controllers/ci/projects_controller.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/controllers/ci/projects_controller.rb b/app/controllers/ci/projects_controller.rb
index 33b8ae64659..64d544acfd9 100644
--- a/app/controllers/ci/projects_controller.rb
+++ b/app/controllers/ci/projects_controller.rb
@@ -14,9 +14,11 @@ module Ci
def show
@ref = params[:ref]
- @commits = @project.commits.reverse_order
- # TODO: this is broken
- # @commits = @commits.where(ref: @ref) if @ref
+ @commits = @project.commits.group(:sha).reverse_order
+ if @ref
+ builds = @project.builds.where(ref: @ref).select(:commit_id).distinct
+ @commits = @commits.where(id: builds)
+ end
@commits = @commits.page(params[:page]).per(20)
end