Replace command parameters with values
To create a minimalistic parser, nom is used to identify and replace parameters given in the command field. For clarity the `action` field for hooks was renamed to `command`.
This commit is contained in:
parent
12c3b12c31
commit
0610fd49c9
5 changed files with 205 additions and 23 deletions
22
README.md
22
README.md
|
@ -1,8 +1,8 @@
|
|||
# Webhookey
|
||||
Webhookey basically is a webserver listening for requests as for
|
||||
example sent as gitea's webhooks. Further, Webhookey allows you to
|
||||
specifiy rules which are matched against the data received to trigger
|
||||
certain actions.
|
||||
Webhookey is a webserver listening for requests as for example sent by
|
||||
gitea's webhooks. Further, Webhookey allows you to specifiy rules
|
||||
which are matched against the data received to trigger certain
|
||||
actions.
|
||||
|
||||
## Build
|
||||
|
||||
|
@ -55,12 +55,15 @@ Configuration syntax is YAML and has to be done in following order:
|
|||
|
||||
Right now there is only the configuration parameter for hooks, here
|
||||
each hook has to be configured, It contains following fields:
|
||||
- action: optional string for the action to be executed when all
|
||||
filters match
|
||||
- secrets: list of secrets
|
||||
- filters: list of filters
|
||||
- command: Optional string for a command to be executed when all
|
||||
filters match. Pointers ([RFC
|
||||
6901](https://tools.ietf.org/html/rfc6901)) to JSON fields may be
|
||||
used to be replaced with data from the JSON data with `{{
|
||||
/field/pointed/to }}`
|
||||
- secrets: List of secrets.
|
||||
- filters: List of filters.
|
||||
|
||||
Each filter has to have following fields:
|
||||
Each filter must have following fields:
|
||||
- pointer: pointer to the JSON field according to [RFC
|
||||
6901](https://tools.ietf.org/html/rfc6901)
|
||||
- regex: regular expression which has to match the field pointed to by
|
||||
|
@ -88,3 +91,4 @@ Whereas `<config_dir>` depends on the platform:
|
|||
### Authentication features
|
||||
### Secure cookies?
|
||||
## Parameterize fields
|
||||
## Use proptest or quickcheck for tests of parsers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue