[FIX] runbot_merge: remove commit from message when closing a PR

As noted in the old comment, the provided commit was the head of the
staging branch. This confused many users as they'd click the link
expecting to see their commit and potentially got something completely
unrelated.

Since we already get backlinks from the commit through the "closes
<pr_number>" added either by the committer or by the bot itself, the
information is already available.
This commit is contained in:
Xavier Morel 2018-10-12 16:52:42 +02:00
parent bab7e25a9a
commit 41400f791b

View File

@ -964,9 +964,7 @@ class Stagings(models.Model):
)
prs.write({'state': 'merged'})
for pr in prs:
# FIXME: this is the staging head rather than the actual merge commit for the PR
staging_head = staging_heads.get(pr.repository.name + '^') or staging_heads[pr.repository.name]
gh[pr.repository.name].close(pr.number, 'Merged in {}'.format(staging_head))
gh[pr.repository.name].close(pr.number, 'Merged, thanks!')
finally:
self.batch_ids.write({'active': False})
self.write({'active': False})