BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
3fe4a2f5
Commit
3fe4a2f5
authored
Jun 02, 2016
by
Zeger-Jan van de Weg
Committed by
Z.J. van de Weg
Jun 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix race condition on auto merge
parent
af493ccf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
CHANGELOG
CHANGELOG
+1
-0
merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+12
-3
No files found.
CHANGELOG
View file @
3fe4a2f5
...
...
@@ -99,6 +99,7 @@ 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
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
3fe4a2f5
...
...
@@ -205,9 +205,18 @@ 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?
MergeRequests
::
MergeWhenBuildSucceedsService
.
new
(
@project
,
current_user
,
merge_params
)
.
execute
(
@merge_request
)
@status
=
:merge_when_build_succeeds
if
@merge_request
.
ci_commit
.
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?
MergeWorker
.
perform_async
(
@merge_request
.
id
,
current_user
.
id
,
params
)
@status
=
:success
else
@status
=
:failed
end
else
MergeWorker
.
perform_async
(
@merge_request
.
id
,
current_user
.
id
,
params
)
@status
=
:success
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment