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>2016-06-03 16:35:16 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-03 16:49:14 +0300
commit9423547f6181bc7e4c9c32e86bd7f72b4c094de0 (patch)
tree306d9bca32e9924268065f5d14ef57c37f301804 /lib/api/commit_statuses.rb
parent4d5f7aa00827f425dd3d2c3bd5a395c8e948f0ba (diff)
Fix other places where we still use commit attribute of Build
Diffstat (limited to 'lib/api/commit_statuses.rb')
-rw-r--r--lib/api/commit_statuses.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb
index 7fc83380764..088d5bac587 100644
--- a/lib/api/commit_statuses.rb
+++ b/lib/api/commit_statuses.rb
@@ -23,7 +23,7 @@ module API
not_found!('Commit') unless user_project.commit(params[:sha])
ci_commits = user_project.pipelines.where(sha: params[:sha])
- statuses = ::CommitStatus.where(commit: ci_commits)
+ statuses = ::CommitStatus.where(pipeline: ci_commits)
statuses = statuses.latest unless parse_boolean(params[:all])
statuses = statuses.where(ref: params[:ref]) if params[:ref].present?
statuses = statuses.where(stage: params[:stage]) if params[:stage].present?
@@ -67,8 +67,8 @@ module API
ci_commit = @project.ensure_pipeline(commit.sha, ref)
name = params[:name] || params[:context]
- status = GenericCommitStatus.running_or_pending.find_by(commit: ci_commit, name: name, ref: params[:ref])
- status ||= GenericCommitStatus.new(project: @project, commit: ci_commit, user: current_user)
+ status = GenericCommitStatus.running_or_pending.find_by(pipeline: ci_commit, name: name, ref: params[:ref])
+ status ||= GenericCommitStatus.new(project: @project, pipeline: ci_commit, user: current_user)
status.update(attrs)
case params[:state].to_s