Fix approval notification for MRs without scan result policies
What does this MR do and why?
This MR fixes a bug in approval notification where the note was created if MR does not have scan result policy applied.
Addresses #415706 (closed)
Screenshots or screen recordings
How to set up and validate locally
- Create a project with more than 2 security scanners
- Enable
security_policy_approval_notification
feature flag for the project - Create an MR that removes one of the security scanners
- Verify that the MR has a note posted by
GitLab Security Bot
Example Project: https://gitlab.com/gitlab-org/govern/security-policies/sashis-test-group/without-srp Example MR: gitlab-org/govern/security-policies/sashis-test-group/without-srp!2
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.