Add new line when rewriting git message

Update the forward merge script to add an additional new line when
rewiring the commit message. Prior this this commit, if an additional
line immediately followed the "Fixes ... in ..." pattern it would be
appended to the end of the rewritten fixes line.

Closes gh-16861
pull/17068/head
Phillip Webb 6 years ago
parent 07ebfc036b
commit ef09ee5dea

@ -84,5 +84,5 @@ password = config['github']['credentials']['password']
dry_run = config['dry_run']
new_issue_number = create_issue(username, password, repository, forward_merge.issue, title, labels, milestone, forward_merge.milestone, dry_run)
puts "Created gh-#{new_issue_number} for forward port of gh-#{forward_merge.issue} into #{forward_merge.milestone}"
rewritten_message = forward_merge.message.sub(forward_merge.line, "Closes gh-#{new_issue_number}")
rewritten_message = forward_merge.message.sub(forward_merge.line, "Closes gh-#{new_issue_number}\n")
File.write(message_file, rewritten_message)

Loading…
Cancel
Save