Fix problem with hiding certain changes

parent 9505b205
......@@ -326,20 +326,12 @@ sub get_all_diffs {
my $current = $from;
while ( my $new_version = $self->get_next_version( $current, $to ) ) {
if ( $current eq $from ) {
$excludes = $self->get_excludes_from_changelog( $from, $new_version );
}
$current = $new_version;
my $dashed_version = $new_version;
$dashed_version =~ s/\./-/g;
my $changes = [];
for my $change ( @{ $self->get_changes_for_single_upgrade( $new_version ) } ) {
my $short = $self->get_shortened( $change );
next if $excludes->{ $short };
push @{ $changes }, $change unless $excludes->{ $short };
}
my $changes = clone $self->get_changes_for_single_upgrade( $new_version );
if ( $keywords ) {
next unless $search_results->{ $new_version };
......@@ -350,6 +342,12 @@ sub get_all_diffs {
$changes = \@selected_changes;
}
$changes = [
map { $_->[1] }
grep { !$excludes->{ $_->[0] }++ }
map { [ $self->get_shortened( $_ ), $_ ] } @{ $changes }
];
push @{ $ret->{ 'security' } }, grep { m{CVE-\d{4}-\d+} } @{ $changes };
push @{ $ret->{ 'diffs' } },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment