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
This commit is contained in:
John L. Villalovos 2017-01-06 09:07:42 -08:00
parent 91d908b807
commit 033a83b870
1 changed files with 4 additions and 2 deletions

View File

@ -183,9 +183,10 @@ class Gerrit(threading.Thread):
time.sleep(1) time.sleep(1)
def patchset_created(self, channel, data): def patchset_created(self, channel, data):
msg = '%s proposed %s: %s %s' % ( msg = '%s proposed %s %s: %s %s' % (
data['patchSet']['uploader']['name'], data['patchSet']['uploader']['name'],
data['change']['project'], data['change']['project'],
data['change']['branch'],
data['change']['subject'], data['change']['subject'],
data['change']['url']) data['change']['url'])
self.log.info('Compiled Message %s: %s' % (channel, msg)) self.log.info('Compiled Message %s: %s' % (channel, msg))
@ -255,8 +256,9 @@ class Gerrit(threading.Thread):
self.ircbot.send(channel, msg) self.ircbot.send(channel, msg)
def change_merged(self, channel, data): def change_merged(self, channel, data):
msg = 'Merged %s: %s %s' % ( msg = 'Merged %s %s: %s %s' % (
data['change']['project'], data['change']['project'],
data['change']['branch'],
data['change']['subject'], data['change']['subject'],
data['change']['url']) data['change']['url'])
self.log.info('Compiled Message %s: %s' % (channel, msg)) self.log.info('Compiled Message %s: %s' % (channel, msg))