Skip to content

Add merge request violation component for compliance reports

What does this MR do and why?

This MR adds a component to render the merge request violation in the compliance report as described in #342901 (closed).

Note that this MR merely adds the component. Once the new report application !75015 (merged) is merged then there will be a follow-up MR to implement the component.

Changes made:

  1. [!76214 (e18399cf)] Add utility method to convert an array of snake case objects to camelCase.
  2. [!76214 (60d0b827)] Add a shared UserAvatar component to be used by both the MergeRequestDrawer and Reason components.
  3. [!76214 (dad07dd3)] Update the MergeRequestDrawer drawer to use the new shared UserAvatar component.
  4. [!76214 (cc26a63c)] Add a new merge request violation Reason component to be used in the report app !75015 (merged).

Screenshots or screen recordings

Compliance report

Before After
image image

Compliance drawer

Before After
image image

How to set up and validate locally

  1. Rebase this branch with 342896-create-a-new-merge-request-violations-compliance-report-application from !75015 (merged).
  2. Apply this patch to use the new component in the report app report.patch.
  3. Visit the existing compliance dashboard on a group: [GDK_HOST]/groups/gitlab-org/-/security/compliance_dashboard
  4. Check that it renders the current dashboard and the drawer by clicking on a row
  5. Enable the new feature flag in your terminal: echo "Feature.enable(:compliance_violations_report)" | rails c
  6. Check that it renders the new MR violation reason component in the report

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 #342901 (closed)

Edited by Jiaan Louw

Merge request reports