NAME

GitHub::WebHook::Run - Run a subprocess on GitHub WebHook reception

SYNOPSIS

use Plack::App::GitHub::WebHook;

Plack::App::GitHub::WebHook->new(
    hook => GitHub::WebHook::Run->new(
        chdir => $my_directory,
        cmd   => ['make','install']
    )
)->to_app;

DESCRIPTION

This module can be used to call a command on reception of a GitHub WebHook with Plack::App::GitHub::WebHook. The command is logged with STDOUT on log level info and STDERR on log level error. The command's exit code is ignored.

CONFIGURATION

cmd

The command to execute, given as array reference or as code reference to return an array reference given payload, event, delivery and logger (as usual to all hooks). Empty array references are ignored.

chdir

A directory to change into before command execution

SEE ALSO

IPC::Run3

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.