Add merged merge request delete audit event
What does this MR do and why?
Add merged merge request delete audit event
This commit adds audit event for merged merge request deletion with message including approvers, committers and merged by user details
I have also refactored and moved event generation for merge requests into a separate service.
How to set up and validate locally
- Setup streaming destination https://docs.gitlab.com/ee/administration/audit_event_streaming.html#add-a-new-streaming-destination
- Create two merge requests and merge one of them
- Now delete both merge requests, you can use API DELETE
/api/v4/projects/:project_id/merge_requests/:merge_request_iid
to do so - Check audit events streamed on the destination
- for merged merge request deletion in streaming payload there should be additional details where list of committer ids and approver ids and merged by id and label titles are present and the event name in headers should be
merged_merge_request_deleted
- for non merged merge request deletion the event name should be
delete_merge_request
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #408288 (closed)
Edited by Harsimar Sandhu