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
path: root/app
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-03 16:35:16 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-03 16:49:14 +0300
commit9423547f6181bc7e4c9c32e86bd7f72b4c094de0 (patch)
tree306d9bca32e9924268065f5d14ef57c37f301804 /app
parent4d5f7aa00827f425dd3d2c3bd5a395c8e948f0ba (diff)
Fix other places where we still use commit attribute of Build
Diffstat (limited to 'app')
-rw-r--r--app/controllers/projects/commit_controller.rb6
-rw-r--r--app/models/ci/pipeline.rb2
2 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb
index 287388652e6..737e6c931f7 100644
--- a/app/controllers/projects/commit_controller.rb
+++ b/app/controllers/projects/commit_controller.rb
@@ -104,7 +104,7 @@ class Projects::CommitController < Projects::ApplicationController
end
def ci_builds
- @ci_builds ||= Ci::Build.where(commit: ci_commits)
+ @ci_builds ||= Ci::Build.where(pipeline: ci_commits)
end
def define_show_vars
@@ -117,8 +117,8 @@ class Projects::CommitController < Projects::ApplicationController
@diff_refs = [commit.parent || commit, commit]
@notes_count = commit.notes.count
- @statuses = CommitStatus.where(commit: ci_commits)
- @builds = Ci::Build.where(commit: ci_commits)
+ @statuses = CommitStatus.where(pipeline: ci_commits)
+ @builds = Ci::Build.where(pipeline: ci_commits)
end
def assign_change_commit_vars(mr_source_branch)
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 9352c6f325a..9b5b46f4928 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -23,7 +23,7 @@ module Ci
def self.stages
# We use pluck here due to problems with MySQL which doesn't allow LIMIT/OFFSET in queries
- CommitStatus.where(commit: pluck(:id)).stages
+ CommitStatus.where(pipeline: pluck(:id)).stages
end
def project_id