diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-03 13:34:03 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-03 13:34:03 +0200 |
commit | 08baa9983ee586c10b4fa28f68b10ba8e7807125 (patch) | |
tree | 4c9fe02b24c3896058ee34bb3157da0cd16f479e /lib/api/commit_statuses.rb | |
parent | 0a51c954641c99610e9eddd9323398fb00d273e2 (diff) | |
download | gitlab-ce-08baa9983ee586c10b4fa28f68b10ba8e7807125.tar.gz |
Use pipelines in context of Project
Diffstat (limited to 'lib/api/commit_statuses.rb')
-rw-r--r-- | lib/api/commit_statuses.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb index 0c02b5fd574..7fc83380764 100644 --- a/lib/api/commit_statuses.rb +++ b/lib/api/commit_statuses.rb @@ -22,7 +22,7 @@ module API not_found!('Commit') unless user_project.commit(params[:sha]) - ci_commits = user_project.ci_commits.where(sha: params[:sha]) + ci_commits = user_project.pipelines.where(sha: params[:sha]) statuses = ::CommitStatus.where(commit: ci_commits) statuses = statuses.latest unless parse_boolean(params[:all]) statuses = statuses.where(ref: params[:ref]) if params[:ref].present? @@ -64,7 +64,7 @@ module API ref = branches.first end - ci_commit = @project.ensure_ci_commit(commit.sha, ref) + 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]) |