Fix nil approvals_before_merge migrated as 0 approvals_required
What does this MR do?
When setting MR's approvals_before_merge
to blank value, it would actually set it to nil. In the current behavior, the user would see the project's approvals_before_merge
instead.
This MR simulate this behavior, so if nil is set, we set ApprovalMergeRequestRule
's approvals_required
with project's setting.
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
EE specific content should be in the top level /ee
folder -
Security reports checked/validated by reviewer
Edited by Mark Chao