Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve release notes script #31833

Merged
merged 3 commits into from
Jul 9, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions dev-tools/es_release_notes.pl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
">enhancement", ">bug", ">regression", ">upgrade"
);
my %Ignore = map { $_ => 1 }
( ">non-issue", ">refactoring", ">docs", ">test", ">test-failure", ":Core/Build" );
( ">non-issue", ">refactoring", ">docs", ">test", ":Core/Build", ">test-failure" );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the ordering change necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I based changes off of what was in 6.3, which was missing the ">test-failure" label, and so I added it there. When I changed to master I pulled the wrong change. Fixed


my %Group_Labels = (
'>breaking' => 'Breaking changes',
Expand All @@ -46,6 +46,12 @@
'other' => 'NOT CLASSIFIED',
);

my %Area_Overrides = (
':ml' => 'Machine Learning',
':beats' => 'Beats Plugin',
':Docs' => 'Docs Infrastructure'
);

use JSON();
use Encode qw(encode_utf8);

Expand Down Expand Up @@ -175,8 +181,14 @@ sub fetch_issues {
# 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 { m{:[^/]+/(.+)} && $1 }
grep {/^:/} sort keys %labels;
my @area_labels = grep {/^:/} sort keys %labels;
my ($header) = map { m{:[^/]+/(.+)} && $1 } @area_labels;
if (scalar @area_labels > 1) {
$header = "MULTIPLE AREA LABELS";
}
if (scalar @area_labels == 1 && exists $Area_Overrides{$area_labels[0]}) {
$header = $Area_Overrides{$area_labels[0]};
}
$header ||= 'NOT CLASSIFIED';
for (@Groups) {
if ( $labels{$_} ) {
Expand Down