From ef09ee5dea7bd7cde7195c2911b642d66477fabf Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 28 May 2019 13:27:49 -0700 Subject: [PATCH] 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 --- git/hooks/forward-merge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/hooks/forward-merge b/git/hooks/forward-merge index 3aba7b6117..764511f983 100755 --- a/git/hooks/forward-merge +++ b/git/hooks/forward-merge @@ -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)