App-GitHubWebhooks2Ikachan
view release on metacpan or search on metacpan
t/10_subscribe.t
t/20_error_handling.t
t/resources/commit_comment/created.json
t/resources/issue_comment/created.json
t/resources/issues/closed.json
t/resources/issues/opened.json
t/resources/issues/reopened.json
t/resources/pull_request/closed.json
t/resources/pull_request/opened.json
t/resources/pull_request/reopened.json
t/resources/pull_request/synchronize.json
t/resources/push/commits.json
t/resources/push/merge.json
t/resources/review_comment/created.json
xt/perlcritic.t
xt/perlcriticrc
META.yml
MANIFEST
- issues
Action names to subscribe for `issues` event. Specify by comma separated value.
Now this application supports `opened`, `closed`, and `reopend`.
If you omit this parameter, it will subscribe the all of supported actions of `issues`.
- pull\_request
Action names to subscribe for `pull_request` event. Specify by comma separated value.
Now this application supports `opened`, `closed`, `reopend`, and `synchronize`.
If you omit this parameter, it will subscribe the all of supported actions of `pull_request`.
# SEE ALSO
[githubwebhooks2ikachan](https://metacpan.org/pod/githubwebhooks2ikachan)
[http://developer.github.com/v3/activity/events/types/](http://developer.github.com/v3/activity/events/types/).
# LICENSE
lib/App/GitHubWebhooks2Ikachan.pm view on Meta::CPAN
=item issues
Action names to subscribe for C<issues> event. Specify by comma separated value.
Now this application supports C<opened>, C<closed>, and C<reopend>.
If you omit this parameter, it will subscribe the all of supported actions of C<issues>.
=item pull_request
Action names to subscribe for C<pull_request> event. Specify by comma separated value.
Now this application supports C<opened>, C<closed>, C<reopend>, and C<synchronize>.
If you omit this parameter, it will subscribe the all of supported actions of C<pull_request>.
=back
=back
=head1 SEE ALSO
L<githubwebhooks2ikachan>
t/03_pull_request.t view on Meta::CPAN
payload => $payload,
subscribe => 'pull_request',
pull_request => 'reopened',
),
});
my $got = capture_stderr{ $g2i->respond_to_ikachan($req) };
like $got, qr!\[INFO\] POST $channel, \00303\[pull request reopened \(#15\)\] New Pull Request \(\@moznion\)\17 https://github.com/moznion/sandbox/pull/15!;
};
subtest 'issue synchronize' => sub {
open my $fh, '<', catfile($FindBin::Bin, 'resources', 'pull_request', 'synchronize.json');
my $payload = do { local $/; <$fh>; };
my $req = Plack::Request->new({
HTTP_X_GITHUB_EVENT => "pull_request",
PATH_INFO => "/$channel",
'plack.request.body' => Hash::MultiValue->new(
payload => $payload,
subscribe => 'pull_request',
pull_request => 'synchronize',
),
});
my $got = capture_stderr{ $g2i->respond_to_ikachan($req) };
like $got, qr!\[INFO\] POST $channel, \00303\[pull request synchronize \(#15\)\] New Pull Request \(\@moznion\)\17 https://github.com/moznion/sandbox/pull/15!;
};
subtest 'subscribe all actions' => sub {
open my $fh, '<', catfile($FindBin::Bin, 'resources', 'pull_request', 'opened.json');
my $payload = do { local $/; <$fh>; };
my $req = Plack::Request->new({
HTTP_X_GITHUB_EVENT => "pull_request",
PATH_INFO => "/$channel",
'plack.request.body' => Hash::MultiValue->new(
t/resources/pull_request/synchronize.json view on Meta::CPAN
}
},
"merged": false,
"mergeable": null,
"mergeable_state": "unknown",
"merged_by": null,
"comments": 0,
"review_comments": 0
},
"number": 15,
"action": "synchronize"
}
( run in 0.411 second using v1.01-cache-2.11-cpan-ff066701436 )