summaryrefslogtreecommitdiff
path: root/lib/api/commit_statuses.rb
diff options
context:
space:
mode:
authorJames Edwards-Jones <jamedjo@gmail.com>2017-06-30 08:33:05 +0000
committerJames Edwards-Jones <jamedjo@gmail.com>2017-06-30 08:33:05 +0000
commitb4b9d3dc3816000920f583f717adcb7c58c11508 (patch)
tree88d84c9b1b8da129abaeed6f5d4706dd5e45057b /lib/api/commit_statuses.rb
parent254b4892f9df9bb40e720417f9c16a849ac00e90 (diff)
parenteaa818a7d67634becba2fa0e110d2b8a548e35e6 (diff)
downloadgitlab-ce-b4b9d3dc3816000920f583f717adcb7c58c11508.tar.gz
Merge branch '9-3-stable-patch-3-mysql' into '9-3-stable'
Prepare 9.3.3 Release See merge request !12508
Diffstat (limited to 'lib/api/commit_statuses.rb')
-rw-r--r--lib/api/commit_statuses.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb
index 10f2d5ef6a3..485b680cd5f 100644
--- a/lib/api/commit_statuses.rb
+++ b/lib/api/commit_statuses.rb
@@ -108,6 +108,9 @@ module API
render_api_error!('invalid state', 400)
end
+ MergeRequest.where(source_project: @project, source_branch: ref)
+ .update_all(head_pipeline_id: pipeline) if pipeline.latest?
+
present status, with: Entities::CommitStatus
rescue StateMachines::InvalidTransition => e
render_api_error!(e.message, 400)