summaryrefslogtreecommitdiff
path: root/tool/gen-github-release.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2023-02-09 19:21:05 +0900
committerHiroshi SHIBATA <[email protected]>2023-02-09 19:21:31 +0900
commit0a8faab5c2c33926784950f3c5227382ac09d74b (patch)
tree1a7595b96378bf143bdf1b7f9f676041f3842036 /tool/gen-github-release.rb
parentb49cd843110fd48486ab97085ab475a98780cb45 (diff)
Avoid to duplicate entries that own redmine and github ids
Diffstat (limited to 'tool/gen-github-release.rb')
-rwxr-xr-xtool/gen-github-release.rb11
1 files changed, 5 insertions, 6 deletions
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