2017 © Pedro Peláez
 

library monohook

Fully configurable and extendable VCS hook manager

image

jadb/monohook

Fully configurable and extendable VCS hook manager

  • Tuesday, January 13, 2015
  • by jadb
  • Repository
  • 1 Watchers
  • 3 Stars
  • 51 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Monohook - Git hooks in PHP

A re-visited approach to Git hooks - and probably other like Mercurial or Subversion?, (*1)

Install

Monohook can be installed using Composer:, (*2)

composer require --dev jadb/monohook:dev-master

Usage

Now that you have the package installed, you just need to create your hooks and symlink them to the .monohook config you create., (*3)

To create your .monohook, please refer to the one used for this repository., (*4)

Now, symlink the hooks you want managed by monohook:, (*5)

$ ln -s ../../.monohook .git/hooks/pre-commit
$ ln -s ../../.monohook .git/hooks/post-commit
$ ln -s ../../.monohook .git/hooks/pre-rebase

What's included?

Processors

  • CodeSnifferProcessor: Detect violations of a defined set of coding standards in PHP and CSS.
  • LintProcessor: Syntax check every new PHP file.
  • PHPUnitProcessor: Test (when possible) every new PHP file.
  • RebaseProcessor: Make sure that a rebase does not overwrite already pushed commits.
  • TODO ContentFilterProcessor: Check any new code for filterable content (debug, wording, etc.).
  • TODO ImageOptimizerProcessor: Reduce images' sizes.

Providers

  • GitProvider
  • TODO MercurialProvider
  • TODO SubversionProvider

Handlers

  • StdoutHandler
  • TODO EmailHandler
  • TODO StreamHandler

Contributing

  • Fork
  • Mod, fix, test
  • Optionally write some documentation (currently in README.md)
  • Send pull request

All contributed code must be licensed under the BSD 3-Clause License., (*6)

Bugs & Feedback

http://github.com/jadb/monohook/issues, (*7)

License

Copyright (c) 2015, Jad Bitar, (*8)

Licensed under the BSD 3-Clause License Redistributions of files must retain the above copyright notice., (*9)

Acknowledgements

Originally inspired by AD7six/git-hooks and Seldaek/monolog., (*10)

The Versions

13/01 2015

dev-master

9999999-dev http://github.com/jadb/monohook

Fully configurable and extendable VCS hook manager

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

phpunit hook git phpcs codesniffer