Commit 7cc08723 authored by Marc Shaw's avatar Marc Shaw

Stop checking codeowner changes on MR refresh for deleted branch

Issue:
MR:
parent 694ce654
......@@ -49,6 +49,8 @@ module EE
end
def code_owners_updated?
return if push.branch_removed?
push.modified_paths.find { |path| ::Gitlab::CodeOwners::FILE_PATHS.include?(path) }
end
......
......@@ -122,6 +122,12 @@ RSpec.describe MergeRequests::RefreshService do
it_behaves_like 'does not refresh the code owner rules'
end
context 'when the branch is deleted' do
let(:newrev) { Gitlab::Git::BLANK_SHA }
it_behaves_like 'does not refresh the code owner rules'
end
end
context 'when the branch is not protected' 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