diff options
author | Patrick Bajao <ebajao@gitlab.com> | 2019-03-07 11:51:58 +0300 |
---|---|---|
committer | Patrick Bajao <ebajao@gitlab.com> | 2019-03-07 11:57:01 +0300 |
commit | 461e3979691ade5bac7b882ac2c14b4d3d229676 (patch) | |
tree | ec50a922fd90961edf4e6f9f0075d759a013d863 /lib/gitlab/checks | |
parent | 333097d7652a863f1d328e4c6b86be5e3b570bbf (diff) |
Move empty_repo check on its own
Diffstat (limited to 'lib/gitlab/checks')
-rw-r--r-- | lib/gitlab/checks/branch_check.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/checks/branch_check.rb b/lib/gitlab/checks/branch_check.rb index 75b337a14cc..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? && !project.empty_repo? + if project.empty_repo? + protected_branch_push_checks + elsif creation? && protected_branch_creation_enabled? protected_branch_creation_checks elsif deletion? protected_branch_deletion_checks |