ruby-changes:74282
From: Nobuyoshi <ko1@a...>
Date: Fri, 28 Oct 2022 19:07:42 +0900 (JST)
Subject: [ruby-changes:74282] 1de8a42869 (master): sync_default_gems.rb: do not add extra empty lines [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=1de8a42869 From 1de8a4286950b554093e4fea4ace85a312a7fce8 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 28 Oct 2022 19:04:10 +0900 Subject: sync_default_gems.rb: do not add extra empty lines [ci skip] --- tool/sync_default_gems.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index b669be7f55..7543b4f73c 100755 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -422,7 +422,7 @@ def message_filter(repo, sha) https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L422 log = STDIN.read log.delete!("\r") url = "https://github.com/#{repo}" - subject, log = log.split("\n\n", 2) + subject, log = log.split(/\n(?:[\s\t]*(?:\n|\z))/, 2) conv = proc do |s| mod = true if s.gsub!(/\b(?:(?i:fix(?:e[sd])?) +)\K#(?=\d+\b)|\bGH-#?(?=\d+\b)|\(\K#(?=\d+\))/) { "#{url}/pull/" @@ -440,7 +440,7 @@ def message_filter(repo, sha) https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L440 end end url = "#{url}/commit/#{sha[0,10]}\n" - if log + if log and !log.empty? conv[log] log.sub!(/\s*(?=(?i:\nCo-authored-by:.*)*\Z)/) { "\n\n#{url}" -- cgit v1.2.3 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/