Use shorter search for protected branch status.
This commit is contained in:
parent
78865a0c99
commit
1c089a8561
1 changed files with 1 additions and 1 deletions
|
@ -471,7 +471,7 @@ class Project < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def developers_can_push_to_protected_branch?(branch_name)
|
||||
protected_branches.map{ |pb| pb.developers_can_push if pb.name == branch_name }.compact.first
|
||||
protected_branches.any? { |pb| pb.name == branch_name && pb.developers_can_push }
|
||||
end
|
||||
|
||||
def forked?
|
||||
|
|
Loading…
Reference in a new issue