Make MR not mergeable if License Compliance has found denied licenses
This is a part of #196845 (closed)
If MR has successfully finished license_scanning
job and some denied
licenses are found, we need to prevent merging of Merge Request.
Implementation plan
- Hide all work behind feature flag
license_compliance_denies_mr
- Define if MR has
denied
licenses (SoftwareLicensePoliciesFinder
andLicenseScanningReportLicenseEntity
for the reference) - Add a field
policy_violation
(true/false) toEE::MergeRequestPollCachedWidgetEntity
with value found on previous step. - Change
MergeRequest
object state to not mergeable if denied licenses are found. Keep in mind that this is EE feature and work should be done inee
directory. This step can be dangerous so it requires thorough testing.
Edited by Tetiana Chupryna