GitHub::WebHook::Run - Run a subprocess on GitHub WebHook reception
use Plack::App::GitHub::WebHook; Plack::App::GitHub::WebHook->new( hook => { Run => [ chdir => $my_directory, cmd => 'make install' ] ) )->to_app;
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.
info
debug
warn
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 call method of all GitHub::WebHook classes).
call
Shell expansion only applies for commands given as string. Empty array references and empty strings are silently ignored.
An optional directory to change into before command execution
GitHub::WebHook, IPC::Run3
Copyright Jakob Voss, 2015-
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install GitHub::WebHook, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GitHub::WebHook
CPAN shell
perl -MCPAN -e shell install GitHub::WebHook
For more information on module installation, please visit the detailed CPAN module installation guide.