Avoid the duplicated entries of GitHub releases
This commit is contained in:
parent
4b01983bf8
commit
f82a6172a2
@ -27,6 +27,8 @@ client = Octokit::Client.new
|
|||||||
|
|
||||||
note = "## What's Changed\n\n"
|
note = "## What's Changed\n\n"
|
||||||
|
|
||||||
|
notes = []
|
||||||
|
|
||||||
diff = client.compare("ruby/ruby", ARGV[0], ARGV[1])
|
diff = client.compare("ruby/ruby", ARGV[0], ARGV[1])
|
||||||
diff[:commits].each do |c|
|
diff[:commits].each do |c|
|
||||||
if c[:commit][:message] =~ /\[(Backport|Feature|Bug) #(\d*)\]/
|
if c[:commit][:message] =~ /\[(Backport|Feature|Bug) #(\d*)\]/
|
||||||
@ -40,11 +42,15 @@ diff[:commits].each do |c|
|
|||||||
else
|
else
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
note << "* [#{title}](#{url})\n"
|
notes << "* [#{title}](#{url})"
|
||||||
rescue OpenURI::HTTPError
|
rescue OpenURI::HTTPError
|
||||||
puts "Error: #{url}"
|
puts "Error: #{url}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
notes.uniq!
|
||||||
|
|
||||||
|
note << notes.join("\n")
|
||||||
|
|
||||||
note << "\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 << "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"
|
note << "## Full Changelog\n\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user