Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
ba6f7699
Commit
ba6f7699
authored
Oct 12, 2017
by
Micael Bergeron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for discussion
parent
371a77c0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
app/services/merge_requests/merge_service.rb
app/services/merge_requests/merge_service.rb
+4
-3
No files found.
app/services/merge_requests/merge_service.rb
View file @
ba6f7699
...
...
@@ -61,8 +61,6 @@ module MergeRequests
MergeRequests
::
PostMergeService
.
new
(
project
,
current_user
).
execute
(
merge_request
)
if
delete_source_branch?
# Verify again that the source branch can be removed, since branch may be protected,
# or the source branch may have been updated.
DeleteBranchService
.
new
(
@merge_request
.
source_project
,
branch_deletion_user
)
.
execute
(
merge_request
.
source_branch
)
end
...
...
@@ -76,6 +74,9 @@ module MergeRequests
@merge_request
.
force_remove_source_branch?
?
@merge_request
.
author
:
current_user
end
# Verify again that the source branch can be removed, since branch may be protected,
# or the source branch may have been updated, or the user may not have permission
#
def
delete_source_branch?
params
.
fetch
(
'should_remove_source_branch'
,
@merge_request
.
force_remove_source_branch?
)
&&
@merge_request
.
can_remove_source_branch?
(
branch_deletion_user
)
...
...
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