Commit 5d6bc189 authored by Fatih Acet's avatar Fatih Acet

Merge branch 'ce-proj-settings-ok-mr-settings-only' into 'master'

CE Improve project merge request settings

See merge request gitlab-org/gitlab-ce!26495
parents dfb26f00 55a9bff7
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
} }
} }
.settings-flex-row { .content-list > .settings-flex-row {
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -2,34 +2,29 @@ ...@@ -2,34 +2,29 @@
.form-group .form-group
= label_tag :merge_method_merge, class: 'label-bold' do = label_tag :merge_method_merge, class: 'label-bold' do
Merge method = _('Merge method')
.form-check .form-check
= form.radio_button :merge_method, :merge, class: "js-merge-method-radio form-check-input" = form.radio_button :merge_method, :merge, class: "js-merge-method-radio form-check-input"
= label_tag :project_merge_method_merge, class: 'form-check-label' do = label_tag :project_merge_method_merge, class: 'form-check-label' do
%strong Merge commit .mb-3
%br = _('Merge commit')
%span.descr .text-secondary
A merge commit is created for every merge, and merging is allowed as long as there are no conflicts. = _('A merge commit is created for every merge, and merging is allowed as long as there are no conflicts.')
.form-check .form-check
= form.radio_button :merge_method, :rebase_merge, class: "js-merge-method-radio form-check-input" = form.radio_button :merge_method, :rebase_merge, class: "js-merge-method-radio form-check-input"
= label_tag :project_merge_method_rebase_merge, class: 'form-check-label' do = label_tag :project_merge_method_rebase_merge, class: 'form-check-label' do
%strong Merge commit with semi-linear history .mb-3
%br = _('Merge commit with semi-linear history')
%span.descr .text-secondary
A merge commit is created for every merge, but merging is only allowed if fast-forward merge is possible. = _('A merge commit is created for every merge, but merging is only allowed if fast-forward merge is possible. This way you could make sure that if this merge request would build, after merging to target branch it would also build.')
This way you could make sure that if this merge request would build, after merging to target branch it would also build. .text-secondary
%br = _('When fast-forward merge is not possible, the user is given the option to rebase.')
%span.descr
When fast-forward merge is not possible, the user is given the option to rebase.
.form-check .form-check
= form.radio_button :merge_method, :ff, class: "js-merge-method-radio qa-radio-button-merge-ff form-check-input" = form.radio_button :merge_method, :ff, class: "js-merge-method-radio qa-radio-button-merge-ff form-check-input"
= label_tag :project_merge_method_ff, class: 'form-check-label' do = label_tag :project_merge_method_ff, class: 'form-check-label' do
%strong Fast-forward merge .mb-3
%br = _('Fast-forward merge')
%span.descr .text-secondary
No merge commits are created and all merges are fast-forwarded, which means that merging is only allowed if the branch could be fast-forwarded. = _('No merge commits are created and all merges are fast-forwarded, which means that merging is only allowed if the branch could be fast-forwarded. When fast-forward merge is not possible, the user is given the option to rebase.')
%br
%span.descr
When fast-forward merge is not possible, the user is given the option to rebase.
...@@ -4,21 +4,21 @@ ...@@ -4,21 +4,21 @@
.form-check.builds-feature{ class: ("hidden" if @project && @project.project_feature.send(:builds_access_level) == 0) } .form-check.builds-feature{ class: ("hidden" if @project && @project.project_feature.send(:builds_access_level) == 0) }
= form.check_box :only_allow_merge_if_pipeline_succeeds, class: 'form-check-input' = form.check_box :only_allow_merge_if_pipeline_succeeds, class: 'form-check-input'
= form.label :only_allow_merge_if_pipeline_succeeds, class: 'form-check-label' do = form.label :only_allow_merge_if_pipeline_succeeds, class: 'form-check-label' do
%strong Only allow merge requests to be merged if the pipeline succeeds .mb-3
%br = _('Only allow merge requests to be merged if the pipeline succeeds')
%span.descr .text-secondary
Pipelines need to be configured to enable this feature. = _('Pipelines need to be configured to enable this feature.')
= link_to icon('question-circle'), help_page_path('user/project/merge_requests/merge_when_pipeline_succeeds', anchor: 'only-allow-merge-requests-to-be-merged-if-the-pipeline-succeeds'), target: '_blank' = link_to icon('question-circle'), help_page_path('user/project/merge_requests/merge_when_pipeline_succeeds', anchor: 'only-allow-merge-requests-to-be-merged-if-the-pipeline-succeeds'), target: '_blank'
= render_if_exists 'projects/merge_pipelines_settings', form: form = render_if_exists 'projects/merge_pipelines_settings', form: form
.form-check .form-check
= form.check_box :only_allow_merge_if_all_discussions_are_resolved, class: 'form-check-input' = form.check_box :only_allow_merge_if_all_discussions_are_resolved, class: 'form-check-input'
= form.label :only_allow_merge_if_all_discussions_are_resolved, class: 'form-check-label' do = form.label :only_allow_merge_if_all_discussions_are_resolved, class: 'form-check-label' do
%strong Only allow merge requests to be merged if all discussions are resolved %p= _('Only allow merge requests to be merged if all discussions are resolved')
.form-check .form-check
= form.check_box :resolve_outdated_diff_discussions, class: 'form-check-input' = form.check_box :resolve_outdated_diff_discussions, class: 'form-check-input'
= form.label :resolve_outdated_diff_discussions, class: 'form-check-label' do = form.label :resolve_outdated_diff_discussions, class: 'form-check-label' do
%strong Automatically resolve merge request diff discussions when they become outdated %p= _('Automatically resolve merge request diff discussions when they become outdated')
.form-check .form-check
= form.check_box :printing_merge_request_link_enabled, class: 'form-check-input' = form.check_box :printing_merge_request_link_enabled, class: 'form-check-input'
= form.label :printing_merge_request_link_enabled, class: 'form-check-label' do = form.label :printing_merge_request_link_enabled, class: 'form-check-label' do
%strong Show link to create/view merge request when pushing from the command line %p= _('Show link to create/view merge request when pushing from the command line')
---
title: Improve project merge request settings
merge_request: 26495
author:
type: other
...@@ -351,6 +351,12 @@ msgstr "" ...@@ -351,6 +351,12 @@ msgstr ""
msgid "A member of GitLab's abuse team will review your report as soon as possible." msgid "A member of GitLab's abuse team will review your report as soon as possible."
msgstr "" msgstr ""
msgid "A merge commit is created for every merge, and merging is allowed as long as there are no conflicts."
msgstr ""
msgid "A merge commit is created for every merge, but merging is only allowed if fast-forward merge is possible. This way you could make sure that if this merge request would build, after merging to target branch it would also build."
msgstr ""
msgid "A new branch will be created in your fork and a new merge request will be started." msgid "A new branch will be created in your fork and a new merge request will be started."
msgstr "" msgstr ""
...@@ -1068,6 +1074,9 @@ msgstr "" ...@@ -1068,6 +1074,9 @@ msgstr ""
msgid "Automatically marked as default internal user" msgid "Automatically marked as default internal user"
msgstr "" msgstr ""
msgid "Automatically resolve merge request diff discussions when they become outdated"
msgstr ""
msgid "Automatically resolved" msgid "Automatically resolved"
msgstr "" msgstr ""
...@@ -3643,6 +3652,9 @@ msgstr "" ...@@ -3643,6 +3652,9 @@ msgstr ""
msgid "Failure" msgid "Failure"
msgstr "" msgstr ""
msgid "Fast-forward merge"
msgstr ""
msgid "Fast-forward merge without a merge commit" msgid "Fast-forward merge without a merge commit"
msgstr "" msgstr ""
...@@ -5016,9 +5028,15 @@ msgstr "" ...@@ -5016,9 +5028,15 @@ msgstr ""
msgid "Merge Requests" msgid "Merge Requests"
msgstr "" msgstr ""
msgid "Merge commit"
msgstr ""
msgid "Merge commit message" msgid "Merge commit message"
msgstr "" msgstr ""
msgid "Merge commit with semi-linear history"
msgstr ""
msgid "Merge events" msgid "Merge events"
msgstr "" msgstr ""
...@@ -5028,6 +5046,9 @@ msgstr "" ...@@ -5028,6 +5046,9 @@ msgstr ""
msgid "Merge in progress" msgid "Merge in progress"
msgstr "" msgstr ""
msgid "Merge method"
msgstr ""
msgid "Merge request" msgid "Merge request"
msgstr "" msgstr ""
...@@ -5459,6 +5480,9 @@ msgstr "" ...@@ -5459,6 +5480,9 @@ msgstr ""
msgid "No license. All rights reserved" msgid "No license. All rights reserved"
msgstr "" msgstr ""
msgid "No merge commits are created and all merges are fast-forwarded, which means that merging is only allowed if the branch could be fast-forwarded. When fast-forward merge is not possible, the user is given the option to rebase."
msgstr ""
msgid "No merge requests found" msgid "No merge requests found"
msgstr "" msgstr ""
...@@ -5650,6 +5674,12 @@ msgstr "" ...@@ -5650,6 +5674,12 @@ msgstr ""
msgid "Only admins" msgid "Only admins"
msgstr "" msgstr ""
msgid "Only allow merge requests to be merged if all discussions are resolved"
msgstr ""
msgid "Only allow merge requests to be merged if the pipeline succeeds"
msgstr ""
msgid "Only mirror protected branches" msgid "Only mirror protected branches"
msgstr "" msgstr ""
...@@ -5905,6 +5935,9 @@ msgstr "" ...@@ -5905,6 +5935,9 @@ msgstr ""
msgid "Pipelines for last year" msgid "Pipelines for last year"
msgstr "" msgstr ""
msgid "Pipelines need to be configured to enable this feature."
msgstr ""
msgid "Pipelines settings for '%{project_name}' were successfully updated." msgid "Pipelines settings for '%{project_name}' were successfully updated."
msgstr "" msgstr ""
...@@ -7409,6 +7442,9 @@ msgstr "" ...@@ -7409,6 +7442,9 @@ msgstr ""
msgid "Show latest version" msgid "Show latest version"
msgstr "" msgstr ""
msgid "Show link to create/view merge request when pushing from the command line"
msgstr ""
msgid "Show parent pages" msgid "Show parent pages"
msgstr "" msgstr ""
...@@ -9247,6 +9283,9 @@ msgstr "" ...@@ -9247,6 +9283,9 @@ msgstr ""
msgid "When enabled, users cannot use GitLab until the terms have been accepted." msgid "When enabled, users cannot use GitLab until the terms have been accepted."
msgstr "" msgstr ""
msgid "When fast-forward merge is not possible, the user is given the option to rebase."
msgstr ""
msgid "When this merge request is accepted" msgid "When this merge request is accepted"
msgid_plural "When these merge requests are accepted" msgid_plural "When these merge requests are accepted"
msgstr[0] "" msgstr[0] ""
......
...@@ -93,11 +93,13 @@ describe 'Projects > Settings > User manages merge request settings' do ...@@ -93,11 +93,13 @@ describe 'Projects > Settings > User manages merge request settings' do
it 'when unchecked sets :printing_merge_request_link_enabled to false' do it 'when unchecked sets :printing_merge_request_link_enabled to false' do
uncheck('project_printing_merge_request_link_enabled') uncheck('project_printing_merge_request_link_enabled')
within('.merge-request-settings-form') do within('.merge-request-settings-form') do
find('.qa-save-merge-request-changes')
click_on('Save changes') click_on('Save changes')
end end
# Wait for save to complete and page to reload find('.flash-notice')
checkbox = find_field('project_printing_merge_request_link_enabled') checkbox = find_field('project_printing_merge_request_link_enabled')
expect(checkbox).not_to be_checked expect(checkbox).not_to be_checked
project.reload project.reload
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment