Fix pipeline success requirement for MRs in security policy projects
What does this MR do and why?
In Disable pipeline must succeed setting for secur... (!162462 - merged), we fixed a bug with security policy projects which inherits only_allow_merge_if_pipeline_succeeds from the group settings. But after the fix, updating the setting for the security policy project was not possible as it was set to false by default.
This MR fixes the bug by taking the value of the project instead of returning false by default.
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- Create a group/sub-group and disable
Pipeline must succeedsetting fromSettings->Merge requests - Create a security policy for the group/sub-group and verify that the security policy project is created
- Go to security policy project ->
Settings->Merge requestsand selectPipeline must succeedand save. Verify that the settings is enabled. - Verify that MR created in the policy project cannot be merged without a pipeline
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #552085 (closed)
Edited by Sashi Kumar Kumaresan