Skip to content

Latest commit

 

History

History
114 lines (85 loc) · 3.78 KB

README.md

File metadata and controls

114 lines (85 loc) · 3.78 KB

Captain Hookie - A CaptainHook Plugin

Maintained - Yes MIT

Overview

This is a private module and is not currently aimed at public usage.

CaptainHook logo

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.

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.

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

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.

Installation

Fancy One Liner

composer config repositories.augustash composer "https://repo.packagist.com/augustash/drupal/" && composer config --no-interaction allow-plugins.captainhook/hook-installer true && composer config --json --merge extra.drupal-scaffold.allowed-packages '["augustash/captain-hookie"]' --merge extra.drupal-scaffold.allowed-packages '["augustash/captain-hookie"]' && composer require --dev augustash/captain-hookie

Manual Setup

  1. Add our Composer repository to your composer.json file:

    composer config repositories.augustash composer "https://repo.packagist.com/augustash/drupal/"

    or:

    {
        "repositories": [
            {
                "type": "composer",
                "url": "https://repo.packagist.com/augustash/drupal/"
            }
        ]
    }
  2. Allow the captainhook/hook-installer plugin to run:

    composer config --no-interaction allow-plugins.captainhook/hook-installer true

    or:

    {
        "config": {
            "allow-plugins": {
                "captainhook/hook-installer": true
            }
        }
    }
  3. Allow the augustash/captain-hookie plugin to run Drupal Scaffold commands:

    composer config --json --merge extra.drupal-scaffold.allowed-packages '["augustash/captain-hookie"]'

    or:

    {
        "extra": {
            "drupal-scaffold": {
                "allowed-packages": [
                    "augustash/captain-hookie"
                ]
            }
        }
    }
  4. Install as a development dependency using composer:

    composer require --dev augustash/captain-hookie

License

MIT