PHPackages                             bitexpert/captainhook-rejectpush - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. bitexpert/captainhook-rejectpush

ActiveLibrary

bitexpert/captainhook-rejectpush
================================

Captain Hook Plugin to reject a remote push when certain commit Ids are found in history

v0.7.0(3y ago)472[1 PRs](https://github.com/bitExpert/captainhook-rejectpush/pulls)Apache-2.0PHPPHP ^8.0.0|^8.1.0|^8.2.0CI passing

Since Mar 6Pushed 1w ago2 watchersCompare

[ Source](https://github.com/bitExpert/captainhook-rejectpush)[ Packagist](https://packagist.org/packages/bitexpert/captainhook-rejectpush)[ RSS](/packages/bitexpert-captainhook-rejectpush/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)Dependencies (13)Versions (18)Used By (0)

bitexpert/captainhook-rejectpush
================================

[](#bitexpertcaptainhook-rejectpush)

This package provides an action for [Captain Hook](https://github.com/CaptainHookPhp/captainhook)which will reject a push to a remote when configured commit Ids are found in the Git history.

[![Build Status](https://github.com/bitExpert/captainhook-rejectpush/workflows/ci/badge.svg?branch=master)](https://github.com/bitExpert/captainhook-rejectpush/actions)[![Coverage Status](https://camo.githubusercontent.com/2496978291d67936f259c3d59c8886279cd05199477626eaee83a0b79a2c6c27/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6269744578706572742f6361707461696e686f6f6b2d72656a656374707573682f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/bitExpert/captainhook-rejectpush?branch=master)[![Mastodon Follow](https://camo.githubusercontent.com/c2abd2d790b2fdf042e992e8872c59044086bdb16b119a61d8526d6238c3c2ba/68747470733a2f2f696d672e736869656c64732e696f2f6d6173746f646f6e2f666f6c6c6f772f3130393430383638313234363937323730303f646f6d61696e3d68747470733a2f2f726865696e6e65636b61722e736f6369616c)](https://rheinneckar.social/@bitexpert)

Installation
------------

[](#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
-----

[](#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](https://github.com/CaptainHookPhp/captainhook) 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
----------

[](#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?
-------------------

[](#want-to-contribute)

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

License
-------

[](#license)

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

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance64

Regular maintenance activity

Popularity10

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 75.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~199 days

Recently: every ~170 days

Total

8

Last Release

1228d ago

PHP version history (5 changes)v0.1.0PHP ^7.2.0

v0.2.0PHP ^7.3.0|^8.0.0

v0.3.0PHP ^7.4.0|^8.0.0

v0.6.0PHP ^7.4.0|^8.0.0|^8.1.0

v0.7.0PHP ^8.0.0|^8.1.0|^8.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1adf0ab660536efce10aeb97f0c90ec881110b64fbd23429fa945190df0def56?d=identicon)[shochdoerfer](/maintainers/shochdoerfer)

---

Top Contributors

[![shochdoerfer](https://avatars.githubusercontent.com/u/596449?v=4)](https://github.com/shochdoerfer "shochdoerfer (110 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (27 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![be-heiglandreas](https://avatars.githubusercontent.com/u/60882198?v=4)](https://github.com/be-heiglandreas "be-heiglandreas (1 commits)")

---

Tags

captainhookgitgithookphp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/bitexpert-captainhook-rejectpush/health.svg)

```
[![Health](https://phpackages.com/badges/bitexpert-captainhook-rejectpush/health.svg)](https://phpackages.com/packages/bitexpert-captainhook-rejectpush)
```

###  Alternatives

[captainhook/plugin-composer

Composer-Plugin handling your git-hooks

201.9M169](/packages/captainhook-plugin-composer)[ramsey/devtools

A Composer plugin to aid PHP library and application development.

7134.7k26](/packages/ramsey-devtools)[moxio/captainhook-eslint

Captain Hook Plugin to validate files using ESLint

1147.9k](/packages/moxio-captainhook-eslint)[bitexpert/captainhook-infection

Captain Hook Plugin to run InfectionPHP only against the files of the current changeset

125.1k5](/packages/bitexpert-captainhook-infection)[captainhook/grumphp

GrumPHP-Integration for CaptainHook

113.9k](/packages/captainhook-grumphp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
