Parse config file and act upon
All dependencies were updated. An example configuration file `config.yml` is added to show the configuration options. Following locations are checked: - `/etc/webhookey/config.yml` - `<config_dir>/webhookey/config.yml` - `./config.yml` Whereas `<config_dir>` is depending on the platform: - Linux: `$XDG_CONFIG_HOME` or `$HOME/.config` - macOS: `$HOME/Library/Application Support` - Windows: `{FOLDERID_RoamingAppData}` Each hook's action is executed if all of the specified filters match.
This commit is contained in:
parent
d8ca63ab37
commit
c8505b27c5
4 changed files with 440 additions and 137 deletions
17
config.yml
Normal file
17
config.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
hooks:
|
||||
hook1:
|
||||
action: "echo hookaction1"
|
||||
filters:
|
||||
match_ref:
|
||||
pointer: "/ref"
|
||||
regex: "refs/heads/master"
|
||||
hook2:
|
||||
action: "echo hookaction2"
|
||||
filters:
|
||||
match_ref:
|
||||
pointer: "/ref"
|
||||
regex: "refs/heads/master"
|
||||
match_after:
|
||||
pointer: "/after"
|
||||
regex: "f6e5fe4fe37df76629112d55cc210718b6a55e7e"
|
Loading…
Add table
Add a link
Reference in a new issue