2019-04-29 11:01:28 -04:00
|
|
|
- expanded = expanded_by_default?
|
2018-08-25 11:32:59 -04:00
|
|
|
|
|
|
|
%section.settings.no-animate#default-branch-settings{ class: ('expanded' if expanded) }
|
|
|
|
.settings-header
|
|
|
|
%h4= _('Default Branch')
|
|
|
|
%button.btn.js-settings-toggle
|
|
|
|
= expanded ? _('Collapse') : _('Expand')
|
|
|
|
%p
|
2021-01-19 16:10:45 -05:00
|
|
|
= _('Set the default branch for this project. All merge requests and commits are made against this branch unless you specify a different one.')
|
2018-08-25 11:32:59 -04:00
|
|
|
|
|
|
|
.settings-content
|
2020-07-27 08:09:50 -04:00
|
|
|
= form_for @project, remote: true, html: { multipart: true, anchor: 'default-branch-settings' }, authenticity_token: true do |f|
|
2020-01-07 19:07:43 -05:00
|
|
|
%fieldset
|
|
|
|
- if @project.empty_repo?
|
|
|
|
.text-secondary
|
|
|
|
= _('A default branch cannot be chosen for an empty project.')
|
|
|
|
- else
|
2018-08-25 11:32:59 -04:00
|
|
|
.form-group
|
|
|
|
= f.label :default_branch, "Default Branch", class: 'label-bold'
|
|
|
|
= f.select(:default_branch, @project.repository.branch_names, {}, {class: 'select2 select-wide'})
|
2020-01-07 19:07:43 -05:00
|
|
|
|
|
|
|
.form-group
|
|
|
|
.form-check
|
|
|
|
= f.check_box :autoclose_referenced_issues, class: 'form-check-input'
|
|
|
|
= f.label :autoclose_referenced_issues, class: 'form-check-label' do
|
|
|
|
%strong= _("Auto-close referenced issues on default branch")
|
|
|
|
.form-text.text-muted
|
2021-01-19 16:10:45 -05:00
|
|
|
= _("When merge requests and commits in the default branch close, any issues they reference also close.")
|
2020-09-11 14:08:42 -04:00
|
|
|
= link_to sprite_icon('question-o'), help_page_path('user/project/issues/managing_issues.md', anchor: 'disabling-automatic-issue-closing'), target: '_blank'
|
2020-01-07 19:07:43 -05:00
|
|
|
|
2020-10-20 11:08:57 -04:00
|
|
|
= f.submit _('Save changes'), class: "gl-button btn btn-success"
|