Add PR description to merge commit in github-merge.py
This commit is contained in:
parent
9edda0c5f5
commit
475c08cb44
1 changed files with 2 additions and 0 deletions
|
@ -175,6 +175,7 @@ def main():
|
||||||
if info is None:
|
if info is None:
|
||||||
exit(1)
|
exit(1)
|
||||||
title = info['title'].strip()
|
title = info['title'].strip()
|
||||||
|
body = info['body'].strip()
|
||||||
# precedence order for destination branch argument:
|
# precedence order for destination branch argument:
|
||||||
# - command line argument
|
# - command line argument
|
||||||
# - githubmerge.branch setting
|
# - githubmerge.branch setting
|
||||||
|
@ -229,6 +230,7 @@ def main():
|
||||||
firstline = 'Merge #%s' % (pull,)
|
firstline = 'Merge #%s' % (pull,)
|
||||||
message = firstline + '\n\n'
|
message = firstline + '\n\n'
|
||||||
message += subprocess.check_output([GIT,'log','--no-merges','--topo-order','--pretty=format:%h %s (%an)',base_branch+'..'+head_branch]).decode('utf-8')
|
message += subprocess.check_output([GIT,'log','--no-merges','--topo-order','--pretty=format:%h %s (%an)',base_branch+'..'+head_branch]).decode('utf-8')
|
||||||
|
message += '\n\nPull request description:\n\n ' + body.replace('\n', '\n ') + '\n'
|
||||||
try:
|
try:
|
||||||
subprocess.check_call([GIT,'merge','-q','--commit','--no-edit','--no-ff','-m',message.encode('utf-8'),head_branch])
|
subprocess.check_call([GIT,'merge','-q','--commit','--no-edit','--no-ff','-m',message.encode('utf-8'),head_branch])
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
|
|
Loading…
Reference in a new issue