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 = STDIN.read
|
||||||
log.delete!("\r")
|
log.delete!("\r")
|
||||||
url = "https://github.com/#{repo}"
|
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|
|
conv = proc do |s|
|
||||||
mod = true if s.gsub!(/\b(?:(?i:fix(?:e[sd])?) +)\K#(?=\d+\b)|\bGH-#?(?=\d+\b)|\(\K#(?=\d+\))/) {
|
mod = true if s.gsub!(/\b(?:(?i:fix(?:e[sd])?) +)\K#(?=\d+\b)|\bGH-#?(?=\d+\b)|\(\K#(?=\d+\))/) {
|
||||||
"#{url}/pull/"
|
"#{url}/pull/"
|
||||||
|
@ -440,7 +440,7 @@ def message_filter(repo, sha)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
url = "#{url}/commit/#{sha[0,10]}\n"
|
url = "#{url}/commit/#{sha[0,10]}\n"
|
||||||
if log
|
if log and !log.empty?
|
||||||
conv[log]
|
conv[log]
|
||||||
log.sub!(/\s*(?=(?i:\nCo-authored-by:.*)*\Z)/) {
|
log.sub!(/\s*(?=(?i:\nCo-authored-by:.*)*\Z)/) {
|
||||||
"\n\n#{url}"
|
"\n\n#{url}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue