Add metrics widget extension

What does this MR do and why?

For #338282 (closed), also addresses #244337 and #11945 (closed)

This MR recreates the old generic metrics widget using the new merge request reports framework.

Screenshots or screen recordings

description screenshot
loading Screen_Shot_2022-02-11_at_13.48.56
error Screen_Shot_2022-02-11_at_13.50.14
summary with no changes Screen_Shot_2022-02-15_at_13.31.41
summary with changes Screen_Shot_2022-02-15_at_13.28.14
expanded with changes Screen_Shot_2022-02-15_at_13.28.36
scrolling through changes Screen_Recording_2022-02-11_at_14.18.24

How to set up and validate locally

  1. git checkout 338282-metrics-mr-report-widget
  2. echo "Feature.enable(:refactor_mr_widgets_extensions)" | rails c
  3. set up metrics reports for a project (or clone this test project)
  4. run a pipeline in the project for the default branch that generates a metrics report
  5. run a pipeline for another branch that changes the metrics in the report
  6. open a merge request for that branch
  7. the metrics widget should appear in the merge request

note: the old widget will appear below the new widget, this is expected while we're implementing the new widgets Screen_Shot_2022-02-11_at_14.02.04

MR acceptance checklist

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

Edited by Miranda Fluharty

Merge request reports

Loading