sync_default_gems.rb: ensure that commit messages end with \n
Commit messages written on GitHub's Web UI apparently use \r\n as a line separator and do not have a \n at the end of message, unlike those normally made with the git CLI. This breaks the expectation of the regexps used later.
This commit is contained in:
parent
4fced78605
commit
fb12522b00
@ -443,6 +443,7 @@ module SyncDefaultGems
|
|||||||
def message_filter(repo, sha, input: ARGF)
|
def message_filter(repo, sha, input: ARGF)
|
||||||
log = input.read
|
log = input.read
|
||||||
log.delete!("\r")
|
log.delete!("\r")
|
||||||
|
log << "\n" if !log.end_with?("\n")
|
||||||
repo_url = "https://github.com/#{repo}"
|
repo_url = "https://github.com/#{repo}"
|
||||||
subject, log = log.split(/\n(?:[ \t]*(?:\n|\z))/, 2)
|
subject, log = log.split(/\n(?:[ \t]*(?:\n|\z))/, 2)
|
||||||
conv = proc do |s|
|
conv = proc do |s|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user