Skip to content

Fix nil approvals_before_merge migrated as 0 approvals_required

Mark Chao requested to merge 1979-1-2-fix-hook into master

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?

#8647 (closed)

Does this MR meet the acceptance criteria?

Edited by Mark Chao

Merge request reports