2017 © Pedro Peláez
 

library hookmeup

PHP git hook manager

image

sebastianfeldmann/hookmeup

PHP git hook manager

  • Thursday, May 3, 2018
  • by sebastianfeldmann
  • Repository
  • 2 Watchers
  • 37 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 10 Forks
  • 0 Open issues
  • 19 Versions
  • 0 % Grown

The README.md

Latest Stable Version PHP Version Downloads Downloads Downloads License Build Status Code Quality Code Coverage X Mastodon, (*1)

CaptainHook

CaptainHook logo, (*2)

CaptainHook is an easy to use and very flexible git hook library for php developers. It enables you to configure your git hook actions in a simple json file., (*3)

You can use CaptainHook to validate or prepare your commit messages, ensure code quality or run unit tests before you commit or push changes to git. You can automatically clear local caches or install the latest composer dependencies after pulling the latest changes., (*4)

CaptainHook makes it easy to share hooks within your team and even can make sure that everybody in your team activates the hooks locally., (*5)

You can run cli commands, use some built in validators, or write your own PHP classes that get executed by CaptainHook. For more information have a look at the documentation., (*6)

Installation

The preferred method to install CaptainHook is to install the PHAR file. You can do so by using Phive, use the PHAR Composer package, or download the PHAR from the GitHub release page., (*7)

phive install captainhook

Or use Composer to install it., (*8)

composer require --dev captainhook/captainhook-phar

If you want to get the source code with all its dependencies you can use:, (*9)

composer require --dev captainhook/captainhook

Setup

After installing CaptainHook you can use the captainhook executable to create a configuration., (*10)

vendor/bin/captainhook configure

After creating the captainhook.json configuration file you have to activate the hooks by installing them to your local .git directory. To do so just run the following CaptainHook command., (*11)

vendor/bin/captainhook install

Have a look at this short installation video., (*12)

Install demo, (*13)

One of the goals of CaptainHook is to make it easy for a team to use the same git hooks. If you want to make sure everybody actually installs the hooks you can use the small Composer plugin hook-installer. It runs the captainhook install command everytime you run a Composer command., (*14)

composer require --dev captainhook/hook-installer

Off course teammates can still commit without executing the hooks, that's why you should run appropriate checks on the backend as well. But at least this way nobody can forget to install them "by accident"., (*15)

Configuration

Here's an example captainhook.json configuration file., (*16)

{
  "commit-msg": {
    "actions": [
      {
        "action": "\\CaptainHook\\App\\Hook\\Message\\Action\\Beams"
      }
    ]
  },
  "pre-commit": {
    "actions": [
      {
        "action": "phpunit"
      },
      {
        "action": "phpcs --standard=psr12 src"
      }
    ]
  }
}

Documentation

The full documentation can be found at php.captainhook.info., (*17)

Contributing

So you'd like to contribute to the CaptainHook project? Excellent! Thank you very much. I can absolutely use your help., (*18)

Have a look at the contribution guidelines., (*19)

The Versions

03/05 2018

dev-master

9999999-dev https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

03/05 2018

2.1.1

2.1.1.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

18/01 2018

2.1.0

2.1.0.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

14/01 2018

2.0.5

2.0.5.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

04/10 2017

2.0.4

2.0.4.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

25/04 2017

2.0.3

2.0.3.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

21/04 2017

2.0.2

2.0.2.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

21/04 2017

2.0.1

2.0.1.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

01/02 2017

2.0.0

2.0.0.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

23/01 2017

2.0.0-beta1

2.0.0.0-beta1 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

14/01 2017

1.2.1

1.2.1.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

20/09 2016

1.2.0

1.2.0.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

14/09 2016

1.1.1

1.1.1.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

13/09 2016

1.1.0

1.1.0.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

12/09 2016

1.0.4

1.0.4.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

08/09 2016

1.0.3

1.0.3.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

08/09 2016

1.0.2

1.0.2.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

07/09 2016

1.0.1

1.0.1.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg

07/09 2016

1.0.0

1.0.0.0 https://github.com/sebastianfeldmann/captainhook

PHP git hook manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sebastian Feldmann

git pre-commit hooks pre-push commit-msg