Skip to content

Copy additional approval rule properties on finalize

What does this MR do and why?

When finalizing the MR, we need to copy over the rule_type, and report_type. This way, we don't need to rely on the project rule existing, as we have all the information needed.

To test:

  • Create two approval rules, 1 targeting branch master, 1 targeting branch *test
  • Create MR with target branch master
  • Turn Feature flag copy_additional_properties_approval_rules off
  • Merge
  • Check in rails console that the unapplicable rule is there merge_request.approval_rules
  • Check the rules are only of type, regular
  • Create MR with target branch master
  • Turn Feature flag copy_additional_properties_approval_rules on
  • Merge
  • Check in rails console that the unapplicable rule is not there merge_request.approval_rules
  • Check the rules are the correct report_type

Related to #420636 (closed)

Edited by Patrick Bajao

Merge request reports

Loading