MR pipeline widget - Pipeline Mini Graph variables
What does this MR do and why?
resolves #493954 (closed)
Wiring in correct variables for a merge pipeline.
- If an MR is pre-merge, we display the pipeline mini graph sending
pipelinevariables from the REST call. - If the MR is post-merge, we display another pipeline widget with the merge pipeline.
mergePipelinedoes not exist in our GraphQL data yet, so for now we use the merge pipeline ID from the REST call, fetch theiidandfullPathwith a GraphQL call, and send that data as a variable along with the target project path.
Future iterations:
- Update
mergeRequestto includemergePipelinein GraphQL - Fetch pre-merge pipeline with
GraphQL - Pipeline subscriptions
- Clean up REST pipeline data from this widget as we will no longer need it
Screenshots or screen recordings
Note that the 2 pipeline mini graphs are different
How to set up and validate locally
Feature flag: ci_graphql_pipeline_mini_graph
- Open an MR
- merge the MR
- The 2 pipeline widgets should render one pipeline mini graph which fetches
pipelinefrom REST and then one which fetches the target project pipeline post-merge using GraphQL
Note: if your MR is from a forked project, the fullPath of the pipeline should show the source project path instead of the target project path.
Edited by Briley Sandlin
