Skip to content

Commit

Permalink
sync_default_gems.rb: ensure that commit messages end with \n
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rhenium committed Jul 12, 2023
1 parent 4fced78 commit fb12522
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tool/sync_default_gems.rb
Expand Up @@ -443,6 +443,7 @@ def sync_default_gems(gem)
def message_filter(repo, sha, input: ARGF)
log = input.read
log.delete!("\r")
log << "\n" if !log.end_with?("\n")
repo_url = "https://github.com/#{repo}"
subject, log = log.split(/\n(?:[ \t]*(?:\n|\z))/, 2)
conv = proc do |s|
Expand Down

0 comments on commit fb12522

Please sign in to comment.