From 41400f791b5c9642567169db38ab6ac6931fa41a Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 12 Oct 2018 16:52:42 +0200 Subject: [PATCH] [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 " added either by the committer or by the bot itself, the information is already available. --- runbot_merge/models/pull_requests.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/runbot_merge/models/pull_requests.py b/runbot_merge/models/pull_requests.py index f3868e6b..b0adb3db 100644 --- a/runbot_merge/models/pull_requests.py +++ b/runbot_merge/models/pull_requests.py @@ -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})