Skip to content
Captain Hook Plugin to reject a remote push when certain commit Ids are found in history
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/bitExpert/CaptainHook/RejectPush
tests
.coveralls.yml
.gitignore
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
LICENSE
README.md
build.xml
captainhook.json
composer.json
composer.lock
phpcs.xml
phpstan.neon
phpunit.xml.dist

README.md

bitexpert/captainhook-rejectpush

This package provides an action for Captain Hook which will reject a push to a remote when configured commit Ids are found in the Git history.

Build Status Coverage Status

Installation

The preferred way of installing bitexpert/captainhook-rejectpush is through Composer. You can add bitexpert/captainhook-rejectpush as a dev dependency, as follows:

composer.phar require --dev bitexpert/captainhook-rejectpush

Usage

Add the following code to your captainhook.json configuration file:

{
  "pre-push": {
    "enabled": true,
    "actions": [
      {
        "action": "\\bitExpert\\CaptainHook\\RejectPush\\RejectPushAction",
        "options": {
            "my-origin": [
                "cc9d54f"
            ],
            "other-remote": [
                "41ce954"
            ]
        }
      }
    ]
  }
}

Captain Hook will now check on every push if one of the defined commit Ids is part of the push. If so, it will cancel the push.

Contribute

Please feel free to fork and extend existing or add new features and send a pull request with your changes! To establish a consistent code quality, please provide unit tests for all your changes and adapt the documentation.

Want To Contribute?

If you feel that you have something to share, then we’d love to have you. Check out the contributing guide to find out how, as well as what we expect from you.

License

Captain Hook Reject Push Action is released under the Apache 2.0 license.

You can’t perform that action at this time.