diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-06-27 14:08:40 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-06-27 21:08:31 +0200 |
commit | 6afff7c6073f58caf590dee5dadd84996a69f1ef (patch) | |
tree | 66ee9eb72f602ff193be9bdab9c5ed52facda98a /lib | |
parent | 99bdfd189bc9728444923b93fdd839ebe2b24eb5 (diff) | |
download | gitlab-ce-6afff7c6073f58caf590dee5dadd84996a69f1ef.tar.gz |
Fix head pipeline stored in merge request for external pipelinesfix-head-pipeline-for-commit-status
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/commit_statuses.rb | 3 |
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) |