blib/lib/Plack/App/GitHub/WebHook.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 27 | 31 | 87.1 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
24 | 9 | 0 | 1 | &blessed($hook) and $hook->can('call') |
65 | 7 | 1 | 18 | @rules and $rules[0] eq 'allow' |
8 | 15 | 3 | @rules and $rules[0] eq 'allow' and $_ =~ /^github$/i |
line | l | !l | condition |
---|---|---|---|
24 | 9 | 0 | ref $hook // '' |
44 | 29 | 0 | ref $self->hook // '' |
85 | 3 | 21 | $env->{'HTTP_X_GITHUB_EVENT'} // '' |
86 | 2 | 22 | $env->{'HTTP_X_GITHUB_DELIVERY'} // '' |
101 | 1 | 21 | $self->logger || $env->{'psgix.logger'} || sub { } |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
44 | 11 | 5 | 1 | $self->hook // () |
90 | 22 | 1 | 1 | not $self->events or grep {$event eq $_;} @{$self->events;} |
91 | 1 | 21 | 1 | $req->param('payload') || $req->content |
122 | 5 | 0 | 9 | not eval { do { &$hook(@$args) } } or $@ |