Browse Source

Update formatting

master
Blaine Motsinger 2 months ago
parent
commit
991b174a86
  1. 9
      bin/hook.pl

9
bin/hook.pl

@ -21,8 +21,8 @@ my $ent = $parser->parse( \*STDIN )
chomp( my $date = $ent->head->get( 'Date' ) );
chomp( my $from = $ent->head->get( 'From' ) );
chomp( my $to = $ent->head->get( 'To' ) );
chomp( my $subject = $ent->head->get( 'Subject' ) );
chomp( my $to = $ent->head->get( 'To' ) );
chomp( my $subject = $ent->head->get( 'Subject' ) );
my $body = $ent->stringify_body;
my ( $dsa_number ) = $body =~ /Debian Security Advisory (DSA-\d+)-\d+/;
@ -63,7 +63,10 @@ catch {
};
my $http = HTTP::Tiny->new();
my $response = $http->request( 'POST', $webhook_uri, { headers => { 'content-type' => 'application/json' }, content => $json } );
my $response = $http->request(
'POST', $webhook_uri,
{ headers => { 'content-type' => 'application/json' }, content => $json }
);
unless ( $response->{success} ) {
die 'request was not successful: ' . $response->{reason} . "\n";

Loading…
Cancel
Save