diff --git a/dev-tools/es_release_notes.pl b/dev-tools/es_release_notes.pl index e2984c9920d..4b5112859be 100755 --- a/dev-tools/es_release_notes.pl +++ b/dev-tools/es_release_notes.pl @@ -31,9 +31,8 @@ my @Groups = ( ">breaking", ">breaking-java", ">deprecation", ">feature", ">enhancement", ">bug", ">regression", ">upgrade" ); -my %Ignore = map { $_ => 1 } ( - ">non-issue", ">refactoring", ">docs", ">test", ":Core/Build" -); +my %Ignore = map { $_ => 1 } + ( ">non-issue", ">refactoring", ">docs", ">test", ":Core/Build" ); my %Group_Labels = ( '>breaking' => 'Breaking changes', @@ -70,6 +69,9 @@ sub dump_issues { my $issues = shift; $version =~ s/v//; + my $branch = $version; + $branch =~ s/\.\d+$//; + my ( $day, $month, $year ) = (gmtime)[ 3 .. 5 ]; $month++; $year += 1900; @@ -81,12 +83,16 @@ sub dump_issues { [[release-notes-$version]] == $version Release Notes +coming[$version] + +Also see <>. + ASCIIDOC for my $group ( @Groups, 'other' ) { my $group_issues = $issues->{$group} or next; my $group_id = $group; - $group_id=~s/^>//; + $group_id =~ s/^>//; print "[[$group_id-$version]]\n" . "[float]\n" . "=== $Group_Labels{$group}\n\n"; @@ -162,14 +168,15 @@ ISSUE: for my $issue (@issues) { next if $seen{ $issue->{number} } && !$issue->{pull_request}; - for (@{ $issue->{labels} }) { - next ISSUE if $Ignore{$_->{name}}; + for ( @{ $issue->{labels} } ) { + next ISSUE if $Ignore{ $_->{name} }; } # uncomment for including/excluding PRs already issued in other versions # next if grep {$_->{name}=~/^v2/} @{$issue->{labels}}; my %labels = map { $_->{name} => 1 } @{ $issue->{labels} }; - my ($header) = map { /:.+\/(.+)/ && $1 } grep {/^:/} sort keys %labels; + my ($header) = map { m{:[^/]+/(.+)} && $1 } + grep {/^:/} sort keys %labels; $header ||= 'NOT CLASSIFIED'; for (@Groups) { if ( $labels{$_} ) {