From 033a83b870dcd2f31d557f514b31e60a073b4945 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Fri, 6 Jan 2017 09:07:42 -0800 Subject: [PATCH] For patch submitted/merged, announce the branch When announcing that a patch has been submitted or merged, also announce the branch that the patch is against. Change-Id: I5b325951bdc1b0fca37d8579a14747a4da3b558e --- gerritbot/bot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gerritbot/bot.py b/gerritbot/bot.py index 18f6fef..6db4462 100755 --- a/gerritbot/bot.py +++ b/gerritbot/bot.py @@ -183,9 +183,10 @@ class Gerrit(threading.Thread): time.sleep(1) def patchset_created(self, channel, data): - msg = '%s proposed %s: %s %s' % ( + msg = '%s proposed %s %s: %s %s' % ( data['patchSet']['uploader']['name'], data['change']['project'], + data['change']['branch'], data['change']['subject'], data['change']['url']) self.log.info('Compiled Message %s: %s' % (channel, msg)) @@ -255,8 +256,9 @@ class Gerrit(threading.Thread): self.ircbot.send(channel, msg) def change_merged(self, channel, data): - msg = 'Merged %s: %s %s' % ( + msg = 'Merged %s %s: %s %s' % ( data['change']['project'], + data['change']['branch'], data['change']['subject'], data['change']['url']) self.log.info('Compiled Message %s: %s' % (channel, msg))