From 48589974f40ae440483835a10df0d2014d11bc00 Mon Sep 17 00:00:00 2001 From: Raphael Geissert Date: Mon, 2 Oct 2017 10:27:08 +0000 Subject: Allow an entry to be added directly by typing '- package[...]' git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@56343 e39458fd-73e7-0310-bf30-c45bca0a0e42 --- bin/check-new-issues | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'bin/check-new-issues') diff --git a/bin/check-new-issues b/bin/check-new-issues index 9dff3969db..af3585ae98 100755 --- a/bin/check-new-issues +++ b/bin/check-new-issues @@ -19,6 +19,7 @@ sub print_commands { * .rpackage to launch an editor with a report of the issue against "package" * !command to execute a command with system() without any escaping * v or e to launch an editor with the current item + * - package-entry to add an entry for "package" and lunch an editor (e.g. - poppler ) * q to save and quit * CTRL-C to quit without saving * everything else is inserted as product name for a NOT-FOR-US @@ -104,7 +105,6 @@ my $editor=$ENV{EDITOR} || $ENV{VISUAL} || "vi"; system "cd $basedir/.. ; wget -N $allitemsurl"; system "cd $basedir/.. ; wget -N $wnppurl"; - print "Reading data...\n"; my $entries=read_file($datafile, qr/^CVE/ ); @@ -284,6 +284,21 @@ TODO: foreach my $todo (reverse sort @todos) { next TODO; } } + elsif ($r=~ /^(\-\s+.+)$/ ) { + my @comps=split /\s+/, $1; + push @comps, '' + unless (scalar(@comps)>2); + my $inputentry = join(' ', @comps); + + my $preventry=${$data->{$todo}->{entry}}; + $preventry =~ + s/^\s*TODO: check/\t$inputentry\n$&/m ; + + my $newentry=edit_entry($preventry); + ${$data->{$todo}->{entry}}=$newentry; + print "New entry set to:\n$newentry"; + next TODO; + } elsif ($r=~ /^\.r(.*)$/ ) { my $tmp=new File::Temp(); my $tmpname=$tmp->filename; -- cgit v1.2.3