mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-14 01:24:54 +00:00
added todo
This commit is contained in:
parent
d6d9b405ab
commit
478d189de8
1 changed files with 12 additions and 6 deletions
18
README.md
18
README.md
|
@ -11,10 +11,10 @@ $ go get github.com/adnanh/webhook
|
|||
```go
|
||||
$ go get -u github.com/adnanh/webhook
|
||||
```
|
||||
|
||||
|
||||
## Adding hooks
|
||||
Hooks are defined using JSON format. The _hooks file_ must contain an array of JSON formatted hooks. Here is an example of a valid _hooks file_ containing only one hook. The hook will be triggered whenever a push to the master branch occurrs.
|
||||
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
|
@ -37,8 +37,8 @@ Hooks are defined using JSON format. The _hooks file_ must contain an array of J
|
|||
### And
|
||||
*And rule* will evaluate to _true_, if and only if all of the sub rules evaluate to _true_.
|
||||
```json
|
||||
{
|
||||
"and":
|
||||
{
|
||||
"and":
|
||||
[
|
||||
{
|
||||
"match":
|
||||
|
@ -60,8 +60,8 @@ Hooks are defined using JSON format. The _hooks file_ must contain an array of J
|
|||
### Or
|
||||
*Or rule* will evaluate to _true_, if any of the sub rules evaluate to _true_.
|
||||
```json
|
||||
{
|
||||
"or":
|
||||
{
|
||||
"or":
|
||||
[
|
||||
{
|
||||
"match":
|
||||
|
@ -136,3 +136,9 @@ To override any of these options, you can use the following command line flags:
|
|||
All hooks are served under the `http://ip:port/hook/:id`, where the `:id` corresponds to the hook *id* specified in _hooks file_.
|
||||
|
||||
Visiting `http://ip:port` will show version, uptime and number of hooks the webhook is serving.
|
||||
|
||||
## Todo
|
||||
* Add support for passing parameters from payload to the command that gets executed as part of the hook
|
||||
* Add support for ip white/black listing
|
||||
* Add "match-regex" rule
|
||||
* ???
|
||||
|
|
Loading…
Add table
Reference in a new issue