32 lines
1.6 KiB
Plaintext
32 lines
1.6 KiB
Plaintext
- issuable = local_assigns.fetch(:issuable)
|
|
- project = local_assigns.fetch(:project)
|
|
|
|
- return unless issuable.is_a?(MergeRequest)
|
|
- return if issuable.closed_or_merged_without_fork?
|
|
|
|
.form-group.row
|
|
.col-sm-2.col-form-label.pt-sm-0
|
|
%label
|
|
= _('Merge options')
|
|
.col-sm-10
|
|
- if issuable.can_remove_source_branch?(current_user)
|
|
.form-check.gl-mb-3
|
|
= hidden_field_tag 'merge_request[force_remove_source_branch]', '0', id: nil
|
|
= check_box_tag 'merge_request[force_remove_source_branch]', '1', issuable.force_remove_source_branch?, class: 'form-check-input'
|
|
= label_tag 'merge_request[force_remove_source_branch]', class: 'form-check-label' do
|
|
Delete source branch when merge request is accepted.
|
|
- if !project.squash_never?
|
|
.form-check
|
|
- if project.squash_always?
|
|
= hidden_field_tag 'merge_request[squash]', '1', id: nil
|
|
= check_box_tag 'merge_request[squash]', '1', project.squash_enabled_by_default?, class: 'form-check-input', disabled: 'true'
|
|
- else
|
|
= hidden_field_tag 'merge_request[squash]', '0', id: nil
|
|
= check_box_tag 'merge_request[squash]', '1', issuable_squash_option?(issuable, project), class: 'form-check-input'
|
|
= label_tag 'merge_request[squash]', class: 'form-check-label' do
|
|
Squash commits when merge request is accepted.
|
|
= link_to sprite_icon('question-o'), help_page_path('user/project/merge_requests/squash_and_merge'), target: '_blank'
|
|
- if project.squash_always?
|
|
.gl-text-gray-400
|
|
= _('Required in this project.')
|