Class: Overcommit::Hook::PrePush::Base

Inherits:
Base
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/overcommit/hook/pre_push/base.rb

Overview

Functionality common to all pre-push hooks.

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#applicable_files, #command, #description, #enabled?, #excluded?, #execute, #execute_in_background, #flags, #in_path?, #included_files, #initialize, #name, #parallelize?, #processors, #quiet?, #required?, #required_executable, #required_libraries, #run, #run_and_transform, #skip?

Constructor Details

This class inherits a constructor from Overcommit::Hook::Base

Instance Method Details

#run?Boolean

Returns:

  • (Boolean)


13
14
15
16
17
# File 'lib/overcommit/hook/pre_push/base.rb', line 13

def run?
  super &&
    !exclude_remotes.include?(remote_name) &&
    (include_remote_ref_deletions? || !@context.remote_ref_deletion?)
end