diff options
author | Hiroshi SHIBATA <[email protected]> | 2024-01-09 14:53:17 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2024-01-09 14:53:22 +0900 |
commit | f82a6172a2a96815f9478410116d35c76b56efb5 (patch) | |
tree | 0c22c55a1654934e4e2e9451fcb7b18895ccfbaf | |
parent | 4b01983bf81259e3d1837b4c8a27c440c0278403 (diff) |
Avoid the duplicated entries of GitHub releases
-rwxr-xr-x | tool/gen-github-release.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tool/gen-github-release.rb b/tool/gen-github-release.rb index 5cdf9abf27..8276c438c7 100755 --- a/tool/gen-github-release.rb +++ b/tool/gen-github-release.rb @@ -27,6 +27,8 @@ client = Octokit::Client.new note = "## What's Changed\n\n" +notes = [] + diff = client.compare("ruby/ruby", ARGV[0], ARGV[1]) diff[:commits].each do |c| if c[:commit][:message] =~ /\[(Backport|Feature|Bug) #(\d*)\]/ @@ -40,11 +42,15 @@ diff[:commits].each do |c| else next end - note << "* [#{title}](#{url})\n" + notes << "* [#{title}](#{url})" rescue OpenURI::HTTPError puts "Error: #{url}" end +notes.uniq! + +note << notes.join("\n") + note << "\n" note << "Note: This list is automatically generated by tool/gen-github-release.rb. Because of this, some commits may be missing.\n\n" note << "## Full Changelog\n\n" |