Method: Overcommit::Hook::PrePush::ProtectedBranches#run
- Defined in:
- lib/overcommit/hook/pre_push/protected_branches.rb
#run ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/overcommit/hook/pre_push/protected_branches.rb', line 8 def run return :pass unless illegal_pushes.any? = illegal_pushes.map do |pushed_ref| "Deleting or force-pushing to #{pushed_ref.remote_ref} is not allowed." end [:fail, .join("\n")] end |