[New Audit Event] Include merged MR deletion in UI and Streaming audit logs
Problem to solve
Find out who deleted a merged merge request to identify potential training and permission assignment issues.
Proposal
Audit logs should include events for when a merged merge request is deleted. The event should include the following information:
- List of contributors who committed code
- List of approvers
- List of all labels applied to the MR when it was deleted
- Username of person who merged it
Verification steps
- 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
Edited by Harsimar Sandhu