Commit 1ec64510 authored by Igor Drozdov's avatar Igor Drozdov

Remove merge_requests_conditional_mergeability_check feature flag

parent f74fa6b1
...@@ -818,7 +818,7 @@ class MergeRequest < ApplicationRecord ...@@ -818,7 +818,7 @@ class MergeRequest < ApplicationRecord
end end
def check_mergeability(async: false) def check_mergeability(async: false)
return if Feature.enabled?(:merge_requests_conditional_mergeability_check, default_enabled: true) && !recheck_merge_status? return unless recheck_merge_status?
check_service = MergeRequests::MergeabilityCheckService.new(self) check_service = MergeRequests::MergeabilityCheckService.new(self)
......
...@@ -2140,22 +2140,12 @@ describe MergeRequest do ...@@ -2140,22 +2140,12 @@ describe MergeRequest do
subject.mark_as_mergeable! subject.mark_as_mergeable!
end end
context 'and merge_requests_conditional_mergeability_check feature flag is enabled' do
it 'does not call MergeabilityCheckService' do it 'does not call MergeabilityCheckService' do
expect(MergeRequests::MergeabilityCheckService).not_to receive(:new) expect(MergeRequests::MergeabilityCheckService).not_to receive(:new)
subject.check_mergeability subject.check_mergeability
end end
end end
context 'and merge_requests_conditional_mergeability_check feature flag is disabled' do
before do
stub_feature_flags(merge_requests_conditional_mergeability_check: false)
end
it_behaves_like 'method that executes MergeabilityCheckService'
end
end
end end
describe '#mergeable_state?' do describe '#mergeable_state?' 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