Skip to content

Fix empty state MR pipeline run

Payton Burdette requested to merge 371790-fix-empty-state-run-pipeline into master

What does this MR do and why?

We tried to fix #329787 (closed) where pipelines on the FE where pipelines were not getting created (on the BE) for some MRs (usually community contributors).

The empty state is showing correctly now when those pipelines are not getting created for a MR. But if the MR is a forked MR we show a security warning. The modal was not inserted into the DOM based on some conditions so it errored out.

This MR fixes that problem allowing users to still run a pipeline if no pipelines were created for this unique use-case.

Screenshots or screen recordings

Before

Modal show method undefined

Screen_Shot_2022-08-24_at_4.00.38_PM

After

Modal rendered in DOM

Screen_Shot_2022-08-24_at_4.09.07_PM

How to set up and validate locally

This is the easiest way I've found to test this scenario.

  1. Have a project without ci configured.
  2. Create a MR
  3. In the tryRunPipeline method change the if conditional to return false
  4. Visit the pipelines tab
  5. Click run pipeline
  6. Security modal should show with no console errors

MR acceptance checklist

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

Related to #371790 (closed)

Edited by Payton Burdette

Merge request reports

Loading