diff options
author | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-06-09 11:54:48 +0200 |
---|---|---|
committer | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-06-15 19:17:55 +0200 |
commit | 17ad286e5db45c2d0d39fdceb8f201fe2e780a25 (patch) | |
tree | 118444adc1d19eecd4a17c8245bced3976413fad | |
parent | 3fe4a2f525375a353755e0620988c33c85cd9f9e (diff) | |
download | gitlab-ce-17ad286e5db45c2d0d39fdceb8f201fe2e780a25.tar.gz |
Rename ci_commit to pipeline18131-pressing-merge-when-build-succeeds-at-the-same-exact-time-that-a-build-is-failing-will-merge-the-failed-build
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/CHANGELOG b/CHANGELOG index 7d34937a066..15adf758477 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -42,6 +42,7 @@ v 8.9.0 (unreleased) - Add DB index on users.state - Add rake task 'gitlab:db:configure' for conditionally seeding or migrating the database - Changed the Slack build message to use the singular duration if necessary (Aran Koning) + - Fix race condition on merge when build succeeds - Links from a wiki page to other wiki pages should be rewritten as expected - Add option to project to only allow merge requests to be merged if the build succeeds (Rui Santos) - Fix issues filter when ordering by milestone @@ -99,7 +100,6 @@ v 8.9.0 (unreleased) - Remove tanuki logo from side navigation; center on top nav - Include user relationships when retrieving award_emoji - Various associations are now eager loaded when parsing issue references to reduce the number of queries executed - - Fix race condition on merge when build succeeds v 8.8.5 (unreleased) - Ensure branch cleanup regardless of whether the GitHub import process succeeds diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 49b1f3cec32..851822d805a 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -204,14 +204,14 @@ class Projects::MergeRequestsController < Projects::ApplicationController @merge_request.update(merge_error: nil) - if params[:merge_when_build_succeeds].present? && @merge_request.pipeline && @merge_request.pipeline.active? - if @merge_request.ci_commit.active? + if params[:merge_when_build_succeeds].present? + if @merge_request.pipeline && @merge_request.pipeline.active? MergeRequests::MergeWhenBuildSucceedsService.new(@project, current_user, merge_params) .execute(@merge_request) @status = :merge_when_build_succeeds - # This can be triggered when a user clicks the auto merge button while - # the tests finish at about the same time - elsif @merge_request.ci_commit.success? + elsif @merge_request.pipeline.success? + # This can be triggered when a user clicks the auto merge button while + # the tests finish at about the same time MergeWorker.perform_async(@merge_request.id, current_user.id, params) @status = :success else |