https://github.com/milewski/webhook-exec
A lightweight WebHook Server that execute commands defined directly on your packages.json file.
https://github.com/milewski/webhook-exec
ci webhook
Last synced: 3 months ago
JSON representation
A lightweight WebHook Server that execute commands defined directly on your packages.json file.
- Host: GitHub
- URL: https://github.com/milewski/webhook-exec
- Owner: milewski
- License: mit
- Created: 2017-04-24T01:15:17.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-07-29T11:50:16.000Z (almost 2 years ago)
- Last Synced: 2025-02-28T07:33:05.759Z (3 months ago)
- Topics: ci, webhook
- Language: TypeScript
- Homepage:
- Size: 17.6 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# webhook-exec
[](https://badge.fury.io/js/webhook-exec)
[](https://www.npmjs.com/package/webhook-exec)A lightweight WebHook Server that execute commands defined directly on your packages.json file, how?
```json
{
"scripts": {
"start-webhook": "webhook-exec --port 1234 --secret 123456 --server gogs",
"stop-webhook": "webhook-exec stop"
},
"webhooks": {
"push": [
"git pull",
"npm install",
"npm run build"
],
"delete": "rm -rf . && echo 'bye-bye'"
}
}
```You can find a list of events that you can react to here [https://developer.github.com/webhooks/#events](https://developer.github.com/webhooks/#events)
## Install
```bash
$ npm install webhook-exec -D
```## Options
| Options | type | default | description |
|---------|--------|-----------|---------------------------------------------------------------|
| host | string | localhost | The host address which the webhook will be listening for data |
| port | number | 7070 | The host port number |
| secret | string | - | A secret key shared with your webhook client/server |
| server | string | github | one of `github`, `gogs`, `gitlab`, `bitbucket` |## Commands
`stop` stop the server. example:
```
webhook stop
```## License
[MIT](LICENSE) © [Rafael Milewski](https://rafael-milewski.com?github=readme)