Commit graph

5 commits

Author SHA1 Message Date
finga d552e29e8f Build a Debian package
The first version `0.1.0-rc.0` and metadata for `cargo-deb` is now in
`Cargo.toml`. For that, the service file as well as the config file
were moved.

For a improved systemd service file the `User` and `Group` is now set
via variables and the log level is now set to `info`. In the previous
version of the service file the parameter for `ExecStart` was missing
which prevented this file from working.

The dependencies in `Cargo.lock` were updated.
2021-04-17 00:08:11 +02:00
finga b05acf9c72 Housekeeping of example config and readme
Update readme to current state and rename the example config to
prevent confusion.
2021-03-21 23:35:08 +01:00
finga 0610fd49c9 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`.
2021-03-21 22:38:14 +01:00
finga b370d59b40 Implement secret functionality
In order to validate requests a field called `secret` has to be sent
containing a secret key which validates the request. A hook will be
executed only if the secret sent with the request matches the hook's
secret.
2021-03-19 10:40:19 +01:00
finga c8505b27c5 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.
2021-03-03 15:36:31 +01:00