This instance will be upgraded to Heptapod 0.31.0 (final) on 2022-05-24 at 14:00 UTC+2 (a few minutes of down time)

Commit 1c089a85 authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Use shorter search for protected branch status.

parent 9aa3a45d1453
...@@ -471,7 +471,7 @@ def protected_branch?(branch_name) ...@@ -471,7 +471,7 @@ def protected_branch?(branch_name)
end end
def developers_can_push_to_protected_branch?(branch_name) 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 end
def forked? def forked?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment