diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-03 21:08:19 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-03 21:08:19 +0300 |
commit | d83bbccfcd07ddab93be73959e3b149b75831e28 (patch) | |
tree | d8156497696dd1951f6556307cb3689952933eed /app/models/protected_branch.rb | |
parent | a99d0fa6922be88307b1c80330a257c55c5d8270 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/protected_branch.rb')
-rw-r--r-- | app/models/protected_branch.rb | 4 |
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') |