mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
sync_default_gems.rb: do not add extra empty lines [ci skip]
This commit is contained in:
parent
4021c6565f
commit
1de8a42869
1 changed files with 2 additions and 2 deletions
|
@ -422,7 +422,7 @@ def message_filter(repo, sha)
|
|||
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)
|
|||
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}"
|
||||
|
|
Loading…
Reference in a new issue