Skip to content

Introducing handling of applicable_post_merge to finalize rule service

Marc Shaw requested to merge new_finalize_approach_2 into master

What does this MR do and why?

Now that we have introduced a new column to the approval merge request rule, we need to now store whether or not the rule was applicable or not during the finalize service.

Previously, when we were finalizing the rules, we did not know which of the rules were applicable at merge time or not, leading to a situation where we copied all the rules over, but we weren't sure if they were applicable or not, and this could lead to situations where a rule is shown post merge, which wasn't applicable to the MR.

To Test:

  1. Create a number of rules (any_approvers, code owners and regular (two for two different branches))
  2. Dont allow MRs to override the rules
  3. Create an MR
  4. Merge the MR
  5. Check the rules post merge make sense (the correct rules are true, and others false)
  6. Allow mrs to override rules
  7. Create MR
  8. Change some rules
  9. Check the rules post merge (the correct rules are true, and others false)
Edited by Marc Shaw

Merge request reports