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 pipeline variables from the REST call.
  • If the MR is post-merge, we display another pipeline widget with the merge pipeline. mergePipeline does not exist in our GraphQL data yet, so for now we use the merge pipeline ID from the REST call, fetch the iid and fullPath with a GraphQL call, and send that data as a variable along with the target project path.

Future iterations:

  • Update mergeRequest to include mergePipeline in 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

Screenshot_2024-09-26_at_3.53.13_PM

How to set up and validate locally

Feature flag: ci_graphql_pipeline_mini_graph

  1. Open an MR
  2. merge the MR
  3. The 2 pipeline widgets should render one pipeline mini graph which fetches pipeline from 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

Merge request reports

Loading