Commit b723f517 authored by Thong Kuah's avatar Thong Kuah

Merge branch 'fix_branch_deleted_code_owners_check' into 'master'

Stop checking codeowner changes on MR refresh for deleted branch

See merge request gitlab-org/gitlab!60882
parents 56dec4d4 7cc08723
......@@ -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