summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-02 16:19:18 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-02 16:59:04 +0200
commit021d3810c300d1e0514f21ccb6f1439f59e20565 (patch)
tree771a663395f39530559c73016f26087a0489fae2 /lib/api
parent5accd87ad7b0d960e504910d896a832288e51c8d (diff)
downloadgitlab-ce-021d3810c300d1e0514f21ccb6f1439f59e20565.tar.gz
Rename Ci::Commit to Ci::Pipeline and rename some of the ci_commit to pipeline
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/commit_statuses.rb2
-rw-r--r--lib/api/merge_requests.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb
index 9bcd33ff19e..0c02b5fd574 100644
--- a/lib/api/commit_statuses.rb
+++ b/lib/api/commit_statuses.rb
@@ -50,7 +50,7 @@ module API
commit = @project.commit(params[:sha])
not_found! 'Commit' unless commit
- # Since the CommitStatus is attached to Ci::Commit (in the future Pipeline)
+ # Since the CommitStatus is attached to Ci::Pipeline (in the future Pipeline)
# We need to always have the pipeline object
# To have a valid pipeline object that can be attached to specific MR
# Other CI service needs to send `ref`
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb
index 4e7de8867b4..d129c510d63 100644
--- a/lib/api/merge_requests.rb
+++ b/lib/api/merge_requests.rb
@@ -238,7 +238,7 @@ module API
should_remove_source_branch: params[:should_remove_source_branch]
}
- if parse_boolean(params[:merge_when_build_succeeds]) && merge_request.ci_commit && merge_request.ci_commit.active?
+ if parse_boolean(params[:merge_when_build_succeeds]) && merge_request.pipeline && merge_request.pipeline.active?
::MergeRequests::MergeWhenBuildSucceedsService.new(merge_request.target_project, current_user, merge_params).
execute(merge_request)
else