Skip to content

Commit 475c08c

Browse files
committed
Add PR description to merge commit in github-merge.py
1 parent 9edda0c commit 475c08c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

contrib/devtools/github-merge.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ def main():
175175
if info is None:
176176
exit(1)
177177
title = info['title'].strip()
178+
body = info['body'].strip()
178179
# precedence order for destination branch argument:
179180
# - command line argument
180181
# - githubmerge.branch setting
@@ -229,6 +230,7 @@ def main():
229230
firstline = 'Merge #%s' % (pull,)
230231
message = firstline + '\n\n'
231232
message += subprocess.check_output([GIT,'log','--no-merges','--topo-order','--pretty=format:%h %s (%an)',base_branch+'..'+head_branch]).decode('utf-8')
233+
message += '\n\nPull request description:\n\n ' + body.replace('\n', '\n ') + '\n'
232234
try:
233235
subprocess.check_call([GIT,'merge','-q','--commit','--no-edit','--no-ff','-m',message.encode('utf-8'),head_branch])
234236
except subprocess.CalledProcessError as e:

0 commit comments

Comments
 (0)