From a452199d40db219809711813b3164018fac36062 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Tue, 23 May 2023 10:38:27 -0600 Subject: [PATCH] handle missing branch name --- pr-status.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pr-status.pl b/pr-status.pl index 728c0c4..a1f6041 100755 --- a/pr-status.pl +++ b/pr-status.pl @@ -91,8 +91,10 @@ sub figure_status { # handle this stuff with a regex so we don't have to specify "22.11" kinda stuff my @b = grep /$s/, @{$list}; my $ns = $b[0]; - $status->{info}->{$ns} = JSON::false; - $status->{info}->{$ns} = JSON::true if grep /^$s$/, @{$list}; + if ( defined $ns ) { + $status->{info}->{$ns} = JSON::false; + $status->{info}->{$ns} = JSON::true if grep /^$s$/, @{$list}; + } } }