summaryrefslogtreecommitdiff
path: root/lib/gitlab/checks/change_access.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/checks/change_access.rb')
-rw-r--r--lib/gitlab/checks/change_access.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gitlab/checks/change_access.rb b/lib/gitlab/checks/change_access.rb
index 4b32eb966aa..cb1065223d4 100644
--- a/lib/gitlab/checks/change_access.rb
+++ b/lib/gitlab/checks/change_access.rb
@@ -23,6 +23,7 @@ module Gitlab
protected
def protected_branch_checks
+ return unless @branch_name
return unless project.protected_branch?(@branch_name)
if forced_push? && user_access.cannot_do_action?(:force_push_code_to_protected_branches)