diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-20 00:08:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-20 00:08:49 +0300 |
commit | 1cd61065a0d86b492be5086906429ac5956e3672 (patch) | |
tree | bab228469be487451d64eec4a55820501007c8b4 /app/models/projects/branch_rule.rb | |
parent | d1be3e6f776e1c77976537548c1daa9af2fb2650 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/projects/branch_rule.rb')
-rw-r--r-- | app/models/projects/branch_rule.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/models/projects/branch_rule.rb b/app/models/projects/branch_rule.rb index ae59d24e557..a32e981f791 100644 --- a/app/models/projects/branch_rule.rb +++ b/app/models/projects/branch_rule.rb @@ -5,12 +5,13 @@ module Projects extend Forwardable attr_reader :project, :protected_branch + alias_method :branch_protection, :protected_branch def_delegators(:protected_branch, :name, :group, :default_branch?, :created_at, :updated_at) def initialize(project, protected_branch) - @protected_branch = protected_branch @project = project + @protected_branch = protected_branch end def protected? @@ -22,10 +23,6 @@ module Projects matching_branches = protected_branch.matching(branch_names) matching_branches.count end - - def branch_protection - protected_branch - end end end |