From a0fa339d1dcc6e3d517d969c0ecc668665a5e1f4 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Thu, 21 Aug 2014 10:17:15 +0100 Subject: Add check to highlight that the first reference must be the MGA advisory bug --- lib/MGA/Advisories.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/MGA/Advisories.pm') diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm index 2d066b6..76bf4ef 100644 --- a/lib/MGA/Advisories.pm +++ b/lib/MGA/Advisories.pm @@ -208,6 +208,10 @@ sub assign_id { return; } (my $bugnum) = $adv->{references}[0] =~ m/$config->{bugzilla_url}.*=([0-9]+)$/g; + if (!defined $bugnum) { + print STDERR "First reference does not appear to be a Mageia bug link\n"; + return; + } if ($advbugnum ne $bugnum) { print STDERR "First reference is not the corresponding Mageia advisory bug\n"; return; -- cgit v1.2.1