From 0a87c219e5dac9dbd878a4ba0e3a9c7e559cc3b2 Mon Sep 17 00:00:00 2001 From: Jonathan Hudson Date: Fri, 15 Nov 2024 15:33:51 +0000 Subject: [PATCH] add annotated script to generate RN Changelog (#10468) --- src/utils/generate-prlist-rn.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 src/utils/generate-prlist-rn.rb diff --git a/src/utils/generate-prlist-rn.rb b/src/utils/generate-prlist-rn.rb new file mode 100755 index 000000000..924967948 --- /dev/null +++ b/src/utils/generate-prlist-rn.rb @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby + +# This script creates a list of **merged** PRs for a release + +# gh --repo inavflight/inav pr list --state merged -S "milestone:8.0" -L 500 --json "number,title,author,url" > /tmp/gh.json +# Then process the output `/tmp/gh.json` with this script +# ./generate-prlist-rn.rb /tmp/gh.json > /tmp/rel8prs.md +# +# Then merge the contents of `/tmp/rel8prs.md` into the release notes + +require 'json' +abort("Need the JSON file") unless ARGV[0] +text = File.read(ARGV[0]) +jsa = JSON.parse(text) +jsa.each do |js| + puts "* #%d %s by @%s\n" % [js['number'],js['title'],js['author']['login']] +end -- 2.11.4.GIT