diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2018-12-05 14:39:15 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-12-05 14:39:15 +0000 |
commit | a6778fc647d83c8fbdca69e1bb2d38b490853ba8 (patch) | |
tree | 93d1d2bc4c5bd85e5255b9cfdf29a88ca9af127f /lib/api | |
parent | 107ff10eb68aa8715b8bfc5a8ae13bf2f4453355 (diff) | |
download | gitlab-ce-a6778fc647d83c8fbdca69e1bb2d38b490853ba8.tar.gz |
Rename project's pipelines relation
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/commit_statuses.rb | 4 | ||||
-rw-r--r-- | lib/api/jobs.rb | 2 | ||||
-rw-r--r-- | lib/api/pipelines.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb index 1ba2c150cb4..62c966e06b4 100644 --- a/lib/api/commit_statuses.rb +++ b/lib/api/commit_statuses.rb @@ -29,7 +29,7 @@ module API not_found!('Commit') unless user_project.commit(params[:sha]) - pipelines = user_project.pipelines.where(sha: params[:sha]) + pipelines = user_project.ci_pipelines.where(sha: params[:sha]) statuses = ::CommitStatus.where(pipeline: pipelines) statuses = statuses.latest unless to_boolean(params[:all]) statuses = statuses.where(ref: params[:ref]) if params[:ref].present? @@ -75,7 +75,7 @@ module API pipeline = @project.pipeline_for(ref, commit.sha) unless pipeline - pipeline = @project.pipelines.create!( + pipeline = @project.ci_pipelines.create!( source: :external, sha: commit.sha, ref: ref, diff --git a/lib/api/jobs.rb b/lib/api/jobs.rb index c3f8a84d742..80a5cbd6b19 100644 --- a/lib/api/jobs.rb +++ b/lib/api/jobs.rb @@ -56,7 +56,7 @@ module API end # rubocop: disable CodeReuse/ActiveRecord get ':id/pipelines/:pipeline_id/jobs' do - pipeline = user_project.pipelines.find(params[:pipeline_id]) + pipeline = user_project.ci_pipelines.find(params[:pipeline_id]) builds = pipeline.builds builds = filter_builds(builds, params[:scope]) builds = builds.preload(:job_artifacts_archive, :job_artifacts, project: [:namespace]) diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb index 62d07d945e2..7a7b23d2bbb 100644 --- a/lib/api/pipelines.rb +++ b/lib/api/pipelines.rb @@ -130,7 +130,7 @@ module API helpers do def pipeline - @pipeline ||= user_project.pipelines.find(params[:pipeline_id]) + @pipeline ||= user_project.ci_pipelines.find(params[:pipeline_id]) end end end |