Adds a button to the findings for related issues
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:
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 |
---|---|
And finally, an example of the issues that the "new issue" button creates:
Review/run this locally
- Copy the
pages in mr
job URL (must have succeeded) - Run
bin/review-mr.sh <job url>
Edited by Sam Beckham