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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-03 21:08:19 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-03 21:08:19 +0300
commitd83bbccfcd07ddab93be73959e3b149b75831e28 (patch)
treed8156497696dd1951f6556307cb3689952933eed /app/models/protected_branch.rb
parenta99d0fa6922be88307b1c80330a257c55c5d8270 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/protected_branch.rb')
-rw-r--r--app/models/protected_branch.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb
index b3a918d8952..dfd5c315f6e 100644
--- a/app/models/protected_branch.rb
+++ b/app/models/protected_branch.rb
@@ -95,6 +95,10 @@ class ProtectedBranch < ApplicationRecord
def self.downcase_humanized_name
name.underscore.humanize.downcase
end
+
+ def default_branch?
+ name == project.default_branch
+ end
end
ProtectedBranch.prepend_mod_with('ProtectedBranch')