summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 78c3114ce9c..816d964519d 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -2304,6 +2304,10 @@ class Project < ApplicationRecord
ci_config_path.blank? || ci_config_path == Gitlab::FileDetector::PATTERNS[:gitlab_ci]
end
+ def limited_protected_branches(limit)
+ protected_branches.limit(limit)
+ end
+
private
def closest_namespace_setting(name)