Fix empty state MR pipeline run
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
After
Modal rendered in DOM
How to set up and validate locally
This is the easiest way I've found to test this scenario.
- Have a project without ci configured.
- Create a MR
- In the
tryRunPipeline
method change theif
conditional to returnfalse
- Visit the pipelines tab
- Click run pipeline
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #371790 (closed)