Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2019-03-07 12:42:26 +0300
committerLin Jen-Shin <godfat@godfat.org>2019-03-07 12:42:26 +0300
commitca402c1aef1d0bce81eed57b5c4ea27a9e2afba8 (patch)
tree01592133e1e6c600f5e2869e2106051eae6f216e /lib
parent600fcb1562ba935a2636fc044567017e729a2876 (diff)
parent461e3979691ade5bac7b882ac2c14b4d3d229676 (diff)
Merge branch '58613-protected-branches-error' into 'master'
Allow protected branch creation for empty project Closes #58613 See merge request gitlab-org/gitlab-ce!25834
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/checks/branch_check.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/checks/branch_check.rb b/lib/gitlab/checks/branch_check.rb
index bd305ace0a0..ad926739752 100644
--- a/lib/gitlab/checks/branch_check.rb
+++ b/lib/gitlab/checks/branch_check.rb
@@ -46,7 +46,9 @@ module Gitlab
end
end
- if creation? && protected_branch_creation_enabled?
+ if project.empty_repo?
+ protected_branch_push_checks
+ elsif creation? && protected_branch_creation_enabled?
protected_branch_creation_checks
elsif deletion?
protected_branch_deletion_checks