NAME
GitHub::WebHook::Run - Run a subprocess on GitHub WebHook reception
SYNOPSIS
use Plack::App::GitHub::WebHook;
Plack::App::GitHub::WebHook->new(
hook => {
Run => [
chdir => $my_directory,
cmd => 'make install'
]
)
)->to_app;
DESCRIPTION
This module can be used to call a command on reception of a GitHub WebHook. The command is logged with log level info and its output with STDOUT on log level debug and STDERR on log level warn. The command's exit code is ignored.
CONFIGURATION
- cmd
-
The command to execute, given as array reference or string or as code reference that returns an array reference or a string when called with payload, event, id and logger (as passed to the
callmethod of all GitHub::WebHook classes).Shell expansion only applies for commands given as string. Empty array references and empty strings are silently ignored.
- chdir
-
An optional directory to change into before command execution
SEE ALSO
COPYRIGHT AND LICENSE
Copyright Jakob Voss, 2015-
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.