зеркало из https://github.com/github/ruby.git
sync_default_gems.rb: do not add extra empty lines [ci skip]
This commit is contained in:
Родитель
4021c6565f
Коммит
1de8a42869
|
@ -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}"
|
||||
|
|
Загрузка…
Ссылка в новой задаче