From 0a8faab5c2c33926784950f3c5227382ac09d74b Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 9 Feb 2023 19:21:05 +0900 Subject: Avoid to duplicate entries that own redmine and github ids --- tool/gen-github-release.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tool/gen-github-release.rb') diff --git a/tool/gen-github-release.rb b/tool/gen-github-release.rb index bd0753afb2..f58828b8b4 100755 --- a/tool/gen-github-release.rb +++ b/tool/gen-github-release.rb @@ -25,16 +25,15 @@ diff[:commits].each do |c| url = "https://bugs.ruby-lang.org/issues/#{$1}" title = Nokogiri::HTML(URI.open(url)).title title.gsub!(/ - Ruby master - Ruby Issue Tracking System/, "") - end - - if c[:commit][:message] =~ /\(#(\d*)\)/ + elsif c[:commit][:message] =~ /\(#(\d*)\)/ url = "https://github.com/ruby/ruby/pull/#{$1}" title = Nokogiri::HTML(URI.open(url)).title title.gsub!(/ · ruby\/ruby · GitHub/, "") + else + next end - - next unless url && title - puts "* [#{title}](#{url})" +rescue OpenURI::HTTPError + puts "Error: #{url}" end -- cgit v1.2.3