From: Jane Sandberg Date: Wed, 23 Jun 2021 14:19:14 +0000 (-0700) Subject: Add a script to build point release notes X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fsandbergja%2Fpoint_release_notes_script;p=working%2FEvergreen.git Add a script to build point release notes Signed-off-by: Jane Sandberg --- diff --git a/build/tools/point_release_notes.pl b/build/tools/point_release_notes.pl new file mode 100644 index 0000000000..eb2278f925 --- /dev/null +++ b/build/tools/point_release_notes.pl @@ -0,0 +1,74 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use JSON; +use LWP::Simple qw(get); +use Data::Dumper; +use List::MoreUtils qw(apply uniq); +use autodie; + +my $LAUNCHPAD_BASE_URL = 'https://api.launchpad.net/devel/evergreen/'; +my $LAUNCHPAD_PARAM_STRING = '?ws.op=searchTasks&ws.size=300&status=Fix%20Committed'; +my $version_number = $ARGV[0]; +my $old_version_number = $ARGV[1]; +my $old_version_commit_hash = $ARGV[2]; + +print <<'END_TODO'; + +TODO: Categorize the bug fixes +TODO: Make any necessary edits to the bug descriptions +TODO: Put the contributors in alphabetical order by LAST name +TODO: Grab any upgrade notes from the RELEASE_NOTES_NEXT directory (should be automated eventually) + +END_TODO + +print "== Evergreen $version_number ==\n"; + +print <<"END_OPENING"; + +This release contains bug fixes improving on Evergreen $old_version_number. + +=== Bug Fixes === + +END_OPENING + + +my $url_to_fetch = "$LAUNCHPAD_BASE_URL+milestone/$version_number$LAUNCHPAD_PARAM_STRING"; + +my $response = get_json($url_to_fetch); + +my @bugs = map { get_json($_->{'bug_link'}) } @{$response->{'entries'}}; + + +foreach my $bug (@bugs) { + print "* "; + print $bug->{'title'}; + print ' ('; + print $bug->{'web_link'}; + print '[Bug '; + print $bug->{'id'}; + print "])\n"; +} + +print <<"END_ACKNOWLEDGEMENTS_INTRO"; + +=== Acknowledgements === + +We would like to thank the following individuals who contributed code, +testing and documentation patches to the $version_number point release of Evergreen: + +END_ACKNOWLEDGEMENTS_INTRO + +my @signoffs = qx(git log --pretty=format:%(trailers:only,unfold) $old_version_commit_hash..HEAD); + +my @contributors = apply { s/Signed-off-by:\s(.*)\s<.*/* $1/ } @signoffs; +print sort(uniq(@contributors)); + +sub get_json { + my $url = shift; + return decode_json(get($url)); +} + + +1;