Commit 4ac29f8e authored by GitLab Release Tools Bot's avatar GitLab Release Tools Bot

Merge branch 'security-id-fix-bypass-code-owners' into 'master'

Sync code owners rules on MR update

See merge request gitlab-org/security/gitlab!1003
parents 63ddc629 bf2cb880
......@@ -42,6 +42,13 @@ module EE
private
override :after_update
def after_update(merge_request)
super
::MergeRequests::SyncCodeOwnerApprovalRules.new(merge_request).execute
end
override :create_branch_change_note
def create_branch_change_note(merge_request, branch_type, old_branch, new_branch)
super
......
---
title: Sync code owners rules on MR update
merge_request: 1003
author:
type: security
......@@ -322,5 +322,13 @@ RSpec.describe MergeRequests::UpdateService, :mailer do
it_behaves_like 'undeletable existing approval rules'
end
end
it 'updates code owner approval rules' do
expect_next_instance_of(::MergeRequests::SyncCodeOwnerApprovalRules) do |instance|
expect(instance).to receive(:execute)
end
update_merge_request(title: 'Title')
end
end
end
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