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:
Diffstat (limited to 'app/models/projects/branch_rule.rb')
-rw-r--r--app/models/projects/branch_rule.rb7
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