Skip to content

Allow merge when `License-Check` approve denied licenses

This is a part of #196845 (closed)

This is followed from #215891 (closed)

When MR contains denied licenses, this MR is not mergeable.

We need to allow MR to be mergeable if License-Check is turned on and User approves MR with denied licenses.

Implementation plan

  1. The field policy_violation (true/false) to EE::MergeRequestPollCachedWidgetEntity should returns false if denied licenses are found but there is a License-Check approval.
  2. Change MergeRequest object state to mergeable for the same condition.
Edited by Tetiana Chupryna