[IMP] runbot_merge: add PR ID to commit message when merging

This commit is contained in:
Xavier Morel 2018-03-27 11:24:40 +02:00 committed by xmo-odoo
parent ea9203c359
commit e6f5b84a19
2 changed files with 3 additions and 0 deletions

View File

@ -693,6 +693,8 @@ class Batch(models.Model):
msg = commit['message']
author = commit['author']
msg += '\n\ncloses {pr.repository.name}#{pr.number}'.format(pr=pr)
try:
new_heads[pr] = gh.merge(pr.head, 'tmp.{}'.format(pr.target.name), msg, squash=pr.squash, author=author)['sha']
except exceptions.MergeError:

View File

@ -78,6 +78,7 @@ def test_trivial_flow(env, repo):
'a': b'some other content',
'b': b'a second file',
}
assert master.message, "gibberish\n\nblahblah\n\ncloses odoo/odoo#1"
def test_staging_conflict(env, repo):
# create base branch