Fix project deselect bug
What does this MR do and why?
Fix project deselect bug
- when a project was deselected, it returned undefined, which caused an issue with the yaml
- now handle this case
- update tests
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
error | fixed |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Upload a GitLab Ultimate license
- Navigate to a project => Create a .yml file in it
- Navigate to the project => Secure => Policies => New policy => Scan Execution Policy
- Add new action => Run CI/CD code => Run "Linked existing CI file"
- Select the current project
- Verify the yaml is correct
- Deselect the project with
clear all
- Verify the yaml is correct
Related to #428507 (closed)
Edited by Alexander Turinske