diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-03 15:35:16 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-03 15:49:14 +0200 |
commit | 9423547f6181bc7e4c9c32e86bd7f72b4c094de0 (patch) | |
tree | 306d9bca32e9924268065f5d14ef57c37f301804 /lib | |
parent | 4d5f7aa00827f425dd3d2c3bd5a395c8e948f0ba (diff) | |
download | gitlab-ce-9423547f6181bc7e4c9c32e86bd7f72b4c094de0.tar.gz |
Fix other places where we still use commit attribute of Build
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/commit_statuses.rb | 6 |
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 |