Skip to content

Add MR meta to merge_request_compliance_violations table

What does this MR do and why?

  1. Added columns merged_at (from merge_request_metrics table), target_project_id, title, target_branch (from merge_requests table) to merge_requests_compliance_violations.
  2. Update the execute method of all the modules inside Gitlab::ComplianceManagement::Violations to populate the new columns for new violations.
  3. Whenever the title of a merge request is updated, update the title in merge_requests_compliance_violations table as well to prevent any data inconsistency.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #385499 (closed)

Merge request reports