diff options
author | Hiroshi SHIBATA <[email protected]> | 2023-02-09 19:21:05 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2023-02-09 19:21:31 +0900 |
commit | 0a8faab5c2c33926784950f3c5227382ac09d74b (patch) | |
tree | 1a7595b96378bf143bdf1b7f9f676041f3842036 | |
parent | b49cd843110fd48486ab97085ab475a98780cb45 (diff) |
Avoid to duplicate entries that own redmine and github ids
-rwxr-xr-x | tool/gen-github-release.rb | 11 |
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 |