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
Jérome Perrin
gitlab-ce
Commits
3c476ee6
Commit
3c476ee6
authored
Oct 11, 2016
by
Mark Fletcher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Maintain "force_remove_source_branch" options on Merge Request unless specified
parent
a053430e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
CHANGELOG
CHANGELOG
+1
-0
app/services/merge_requests/update_service.rb
app/services/merge_requests/update_service.rb
+4
-1
spec/services/merge_requests/update_service_spec.rb
spec/services/merge_requests/update_service_spec.rb
+12
-0
No files found.
CHANGELOG
View file @
3c476ee6
...
...
@@ -31,6 +31,7 @@ v 8.13.0 (unreleased)
- Update Gitlab Shell to fix some problems with moving projects between storages
- Cache rendered markdown in the database, rather than Redis
- Avoid database queries on Banzai::ReferenceParser::BaseParser for nodes without references
- Do not alter 'force_remove_source_branch' options on MergeRequest unless specified
- Simplify Mentionable concern instance methods
- API: Ability to retrieve version information (Robert Schilling)
- Fix permission for setting an issue's due date
...
...
app/services/merge_requests/update_service.rb
View file @
3c476ee6
...
...
@@ -15,7 +15,10 @@ module MergeRequests
params
.
except!
(
:target_branch
,
:force_remove_source_branch
)
end
if
params
[
:force_remove_source_branch
].
present?
merge_request
.
merge_params
[
'force_remove_source_branch'
]
=
params
.
delete
(
:force_remove_source_branch
)
end
handle_wip_event
(
merge_request
)
update
(
merge_request
)
end
...
...
spec/services/merge_requests/update_service_spec.rb
View file @
3c476ee6
...
...
@@ -105,6 +105,18 @@ describe MergeRequests::UpdateService, services: true do
expect
(
note
).
not_to
be_nil
expect
(
note
.
note
).
to
eq
'Target branch changed from `master` to `target`'
end
context
'when not including source branch removal options'
do
before
do
opts
.
delete
(
:force_remove_source_branch
)
end
it
'maintains the original options'
do
update_merge_request
(
opts
)
expect
(
@merge_request
.
merge_params
[
"force_remove_source_branch"
]).
to
eq
(
"1"
)
end
end
end
context
'todos'
do
...
...
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