зеркало из https://github.com/github/ruby.git
Родитель
98fbebf110
Коммит
398aaed2f0
|
@ -466,13 +466,13 @@ module SyncDefaultGems
|
|||
if log and !log.empty?
|
||||
log.sub!(/(?<=\n)\n+\z/, '') # drop empty lines at the last
|
||||
conv[log]
|
||||
log.sub!(/(?:(\A\s*)|\s*\n)(?=((?i:Co-authored-by:.*\n)+)?\Z)/) {
|
||||
log.sub!(/(?:(\A\s*)|\s*\n)(?=((?i:^Co-authored-by:.*\n?)+)?\Z)/) {
|
||||
($~.begin(1) ? "" : "\n\n") + commit_url + ($~.begin(2) ? "\n" : "")
|
||||
}
|
||||
else
|
||||
log = commit_url
|
||||
end
|
||||
print subject, "\n\n", log
|
||||
puts subject, "\n", log
|
||||
end
|
||||
|
||||
# NOTE: This method is also used by GitHub ruby/git.ruby-lang.org's bin/update-default-gem.sh
|
||||
|
|
|
@ -62,5 +62,15 @@ module Test_SyncDefaultGems
|
|||
]
|
||||
assert_message_filter(expected, trailers, [expected, "", trailers, ""].join("\n"))
|
||||
end
|
||||
|
||||
def test_co_authored_by_no_newline
|
||||
expected = [
|
||||
"commit something",
|
||||
]
|
||||
trailers = [
|
||||
"Co-Authored-By: git <git@ruby-lang.org>",
|
||||
]
|
||||
assert_message_filter(expected, trailers, [expected, "", trailers].join("\n"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче