line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::GitHubWebhooks2Ikachan::Events::IssueComment; |
2
|
2
|
|
|
2
|
|
2216
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
64
|
|
3
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
55
|
|
4
|
2
|
|
|
2
|
|
9
|
use utf8; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
20
|
|
5
|
2
|
|
|
2
|
|
1529
|
use String::IRC; |
|
2
|
|
|
|
|
1770
|
|
|
2
|
|
|
|
|
425
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub call { |
8
|
1
|
|
|
1
|
0
|
2
|
my ($class, $context) = @_; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
|
|
5
|
my $comment = $context->dat->{comment}; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
|
|
8
|
(my $comment_body = $comment->{body}) =~ s/\r?\n.*//g; |
13
|
1
|
|
|
|
|
3
|
my $user_name = $comment->{user}->{login}; |
14
|
1
|
|
|
|
|
2
|
my $url = $comment->{html_url}; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
|
|
4
|
my $issue = $context->dat->{issue}; |
17
|
1
|
|
|
|
|
6
|
my $issue_number = $issue->{number}; |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
3
|
my $main_text = "[comment (#$issue_number)] $comment_body (\@$user_name)"; |
20
|
1
|
|
|
|
|
3
|
return String::IRC->new($main_text)->green . " $url"; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|