Skip to content

Commit fcfbf8e

Browse files
committed
Meta/cook: retire Old New Topics and send them directly to Cooking
1 parent d7b12b0 commit fcfbf8e

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

cook

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ sub write_cooking {
461461
my $graduated = 'Graduated to "master"';
462462
my $new_topics = 'New Topics';
463463
my $discarded = 'Discarded';
464-
my $old_new_topics = 'Old New Topics';
464+
my $cooking_topics = 'Cooking';
465465

466466
sub update_issue {
467467
my ($cooking) = @_;
@@ -512,20 +512,13 @@ sub update_issue {
512512
if (!$incremental) {
513513
my $sd = $cooking->{'section_data'};
514514
my $sl = $cooking->{'section_list'};
515-
# Rename "New" to "Old New" and insert "New".
516-
# Move "New" to "Old New"
517-
my $i;
518-
my $doneso;
519-
for ($i = 0; $i < @{$sl}; $i++) {
520-
if ($sl->[$i] eq $new_topics) {
521-
$sl->[$i] = $old_new_topics;
522-
unshift @{$sl}, $new_topics;
523-
$doneso = 1;
524-
last;
515+
516+
if (exists $sd->{$new_topics}) {
517+
if (!exists $sd->{$cooking_topics}) {
518+
$sd->{$cooking_topics} = [];
519+
unshift @{$sl}, $cooking_topics;
525520
}
526-
}
527-
if ($doneso) {
528-
$sd->{$old_new_topics} = $sd->{$new_topics};
521+
unshift @{$sd->{$cooking_topics}}, @{$sd->{$new_topics}};
529522
}
530523
$sd->{$new_topics} = [];
531524
}

0 commit comments

Comments
 (0)