diff options
Diffstat (limited to 'app/views/projects/settings/merge_requests/_merge_request_squash_options_settings.html.haml')
-rw-r--r-- | app/views/projects/settings/merge_requests/_merge_request_squash_options_settings.html.haml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/views/projects/settings/merge_requests/_merge_request_squash_options_settings.html.haml b/app/views/projects/settings/merge_requests/_merge_request_squash_options_settings.html.haml new file mode 100644 index 00000000000..372c0723600 --- /dev/null +++ b/app/views/projects/settings/merge_requests/_merge_request_squash_options_settings.html.haml @@ -0,0 +1,25 @@ +- form = local_assigns.fetch(:form) + += form.fields_for :project_setting do |settings| + .form-group + %b= s_('ProjectSettings|Squash commits when merging') + %p.text-secondary + = s_('ProjectSettings|Set the default behavior of this option in merge requests. Changes to this are also applied to existing merge requests.') + = link_to s_('ProjectSettings|What is squashing?'), help_page_path('user/project/merge_requests/squash_and_merge.md'), target: '_blank', rel: 'noopener noreferrer' + + = settings.gitlab_ui_radio_component :squash_option, + :never, + s_('ProjectSettings|Do not allow'), + help_text: s_('ProjectSettings|Squashing is never performed and the checkbox is hidden.') + = settings.gitlab_ui_radio_component :squash_option, + :default_off, + s_('ProjectSettings|Allow'), + help_text: s_('ProjectSettings|Checkbox is visible and unselected by default.') + = settings.gitlab_ui_radio_component :squash_option, + :default_on, + s_('ProjectSettings|Encourage'), + help_text: s_('ProjectSettings|Checkbox is visible and selected by default.') + = settings.gitlab_ui_radio_component :squash_option, + :always, + s_('ProjectSettings|Require'), + help_text: s_('ProjectSettings|Squashing is always performed. Checkbox is visible and selected, and users cannot change it.') |