Skip to content

Adds a button to the findings for related issues

Sam Beckham requested to merge issue-checker into main

What does this MR do?

This MR help link together findings with their related issue ion GitLab. It does so by replicating our current manual process for this using the REST API. There's some other bits in there too to help with the rate limiting.

Video explainer here, or read on for a text/image one:

PAS.mov

Here's a breakdown of how it works.

flowchart TD
    classDef endResult fill:#09c

    A[Extract Component Label and filename]
    C[Build API endpoint to search issues with\ncomponent label and filename in title]
    D{Issue found?}
    E(Show Issue Link)
    F{Rate Limit Reached?}
    G[Extract Component description]
    H[Use gathered information to create link for a new issue]
    I(Show Create issue link)
    J(Show 'check failed')
    K[Check Local Storage for issue]
    L{Issue Found?}
    M[Store issue link in local storage]
    N[Fetch API Endpoint]
    O[/User Hovers Link/]


A  --> K --> L
L --YES--> E
L --NO--> C

C --> N --> D
D --YES--> M --> E:::endResult
D --NO--> F

F --YES--> J:::endResult
F --NO--> G --> H --> I:::endResult

J.-O.->N

To get this new information on in the drawer, I re-jigged the design a little too. Here's a before and after:

Beofre After
Screenshot_2023-06-24_at_09.17.38 Screenshot_2023-06-24_at_09.30.13

And finally, an example of the issues that the "new issue" button creates:

Screenshot_2023-06-24_at_09.30.38

Review/run this locally

  1. Copy the pages in mr job URL (must have succeeded)
  2. Run bin/review-mr.sh <job url>
Edited by Sam Beckham

Merge request reports