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:
authorYorick Peterse <yorickpeterse@gmail.com>2017-11-10 22:57:11 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2017-11-16 18:01:14 +0300
commitab16a6fb34c0f3e4d9afed3332c559868201e606 (patch)
treee878395b0f198b3db1cc014bad02361628f6206e /app/controllers/projects/commits_controller.rb
parent81e94ce1761b48b73be2a8d71938dfe934921e35 (diff)
Optimise getting the pipeline status of commits
This adds an optimised way of getting the latest pipeline status for a list of Commit objects (or just a single one).
Diffstat (limited to 'app/controllers/projects/commits_controller.rb')
-rw-r--r--app/controllers/projects/commits_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/projects/commits_controller.rb b/app/controllers/projects/commits_controller.rb
index 28920877635..5f4afd2cdee 100644
--- a/app/controllers/projects/commits_controller.rb
+++ b/app/controllers/projects/commits_controller.rb
@@ -57,6 +57,7 @@ class Projects::CommitsController < Projects::ApplicationController
@repository.commits(@ref, path: @path, limit: @limit, offset: @offset)
end
+ @commits = @commits.with_pipeline_status
@commits = prepare_commits_for_rendering(@commits)
end
end