aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--lib/MGA/Advisories.pm5
2 files changed, 5 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 2807504..5be70b8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+- list unpublished advisories when mode is set to 'qa'
- add 'nextid' and 'publish' commands to assign an ID to an advisory file
Version 0.6
diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm
index d321017..a69cf16 100644
--- a/lib/MGA/Advisories.pm
+++ b/lib/MGA/Advisories.pm
@@ -58,7 +58,10 @@ sub get_advisories_from_dir {
my %advisories;
foreach my $advfile (glob "$config->{advisories_dir}/*.adv") {
my $adv = LoadFile($advfile);
- next unless $adv->{ID};
+ if (!$adv->{ID}) {
+ next unless $config->{mode} eq 'qa';
+ $adv->{ID} = next_id('TODO', keys %advisories);
+ }
report_exit("Duplicate advisory $adv->{ID}") if $advisories{$adv->{ID}};
report_exit("Unknown type $adv->{type}") unless
$config->{advisory_types}{$adv->{type}};