Открыть боковую панель
nt_test132
nt_project_7gohtg18g8li
Коммиты
3c476ee6
Коммит
3c476ee6
создал
Окт 11, 2016
по автору
Mark Fletcher
Просмотр файлов
Maintain "force_remove_source_branch" options on Merge Request unless specified
владелец
a053430e
Изменения
3
Скрыть пробелы
Построчно
Рядом
CHANGELOG
Просмотр файла @
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
Просмотр файла @
3c476ee6
...
...
@@ -15,7 +15,10 @@ def execute(merge_request)
params
.
except!
(
:target_branch
,
:force_remove_source_branch
)
end
merge_request
.
merge_params
[
'force_remove_source_branch'
]
=
params
.
delete
(
:force_remove_source_branch
)
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
Просмотр файла @
3c476ee6
...
...
@@ -105,6 +105,18 @@ def update_merge_request(opts)
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
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать