Commit 7468ed5f authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'always-show-pipelines-must-succeed-checkbox' into 'master'

Always show "Pipelines must succeed" checkbox

Closes #57291

See merge request gitlab-org/gitlab-ce!28651
parents 5c3cab3d 8af83bbf
...@@ -175,11 +175,6 @@ export default { ...@@ -175,11 +175,6 @@ export default {
if (value === 0) toggleHiddenClassBySelector('.merge-requests-feature', true); if (value === 0) toggleHiddenClassBySelector('.merge-requests-feature', true);
else if (oldValue === 0) toggleHiddenClassBySelector('.merge-requests-feature', false); else if (oldValue === 0) toggleHiddenClassBySelector('.merge-requests-feature', false);
}, },
buildsAccessLevel(value, oldValue) {
if (value === 0) toggleHiddenClassBySelector('.builds-feature', true);
else if (oldValue === 0) toggleHiddenClassBySelector('.builds-feature', false);
},
}, },
methods: { methods: {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.form-group .form-group
%b= s_('ProjectSettings|Merge checks') %b= s_('ProjectSettings|Merge checks')
%p.text-secondary= s_('ProjectSettings|These checks must pass before merge requests can be merged') %p.text-secondary= s_('ProjectSettings|These checks must pass before merge requests can be merged')
.form-check.mb-2.builds-feature{ class: ("hidden" if @project && @project.project_feature.send(:builds_access_level) == 0) } .form-check.mb-2.builds-feature
= 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
= s_('ProjectSettings|Pipelines must succeed') = s_('ProjectSettings|Pipelines must succeed')
......
---
title: Always show "Pipelines must succeed" checkbox
merge_request: 28651
author:
type: fixed
...@@ -51,7 +51,7 @@ describe 'Projects > Settings > User manages merge request settings' do ...@@ -51,7 +51,7 @@ describe 'Projects > Settings > User manages merge request settings' do
end end
it 'shows the Merge Requests settings that do not depend on Builds feature' do it 'shows the Merge Requests settings that do not depend on Builds feature' do
expect(page).not_to have_content 'Pipelines must succeed' expect(page).to have_content 'Pipelines must succeed'
expect(page).to have_content 'All discussions must be resolved' expect(page).to have_content 'All discussions must be resolved'
within('.sharing-permissions-form') do within('.sharing-permissions-form') do
......
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