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 --- NEWS | 2 ++ lib/MGA/Advisories.pm | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 98babfc..4a3d662 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +- add check to highlight that the first reference must be the MGA advisory bug + Version 0.19 - check that SRPMs exist when publishing updates 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