https://github.com/poppinlp/husky-plugin-filter-push
A husky plugin to filter out empty push or delete remote branch push.
https://github.com/poppinlp/husky-plugin-filter-push
filter huksy-plugin husky pre-push
Last synced: 3 months ago
JSON representation
A husky plugin to filter out empty push or delete remote branch push.
- Host: GitHub
- URL: https://github.com/poppinlp/husky-plugin-filter-push
- Owner: poppinlp
- License: mit
- Created: 2018-10-11T07:48:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-11T15:52:48.000Z (over 6 years ago)
- Last Synced: 2025-02-09T02:15:40.092Z (4 months ago)
- Topics: filter, huksy-plugin, husky, pre-push
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# husky-plugin-filter-push
A husky plugin to filter out empty push or delete remote branch push.
## Installation
```shell
npm i -D husky husky-plugin-filter-push
```*This plugin won't install husky for you, you should install it by your self.*
## Usage
You could use this with your husky `pre-push` hook:
```json
{
"hooks": {
"pre-push": "husky-plugin-filter-push --git $HUSKY_GIT_STDIN --command npm test"
}
}
```This will trigger `npm test`.
## Options
There are 2 options for this CLI:
- git: should always be `$HUSKY_GIT_STDIN` for husky >= 1.0.0 and `$GIT_STDIN` for old huksy.
- command: use to run as `pre-push` hook.