Skip to content

Allow protected branch creation for empty project

Patrick Bajao requested to merge 58613-protected-branches-error into master

What does this MR do?

Fixes the bug wherein on a new repo, no one can push to master.

Adds a check on Gitlab::Checks::BranchCheck#protected_branch_checks that will check if the project is empty, it won't run protected_branch_creation_checks but instead will defer to protected_branch_push_checks.

What are the relevant issue numbers?

#58613 (closed)

Does this MR meet the acceptance criteria?

Closes #58613 (closed)

Edited by Patrick Bajao

Merge request reports