Browse Source

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
tags/0.3.0^0
John L. Villalovos 2 years ago
parent
commit
033a83b870
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      gerritbot/bot.py

+ 4
- 2
gerritbot/bot.py View File

@@ -183,9 +183,10 @@ class Gerrit(threading.Thread):
183 183
             time.sleep(1)
184 184
 
185 185
     def patchset_created(self, channel, data):
186
-        msg = '%s proposed %s: %s  %s' % (
186
+        msg = '%s proposed %s %s: %s  %s' % (
187 187
             data['patchSet']['uploader']['name'],
188 188
             data['change']['project'],
189
+            data['change']['branch'],
189 190
             data['change']['subject'],
190 191
             data['change']['url'])
191 192
         self.log.info('Compiled Message %s: %s' % (channel, msg))
@@ -255,8 +256,9 @@ class Gerrit(threading.Thread):
255 256
                 self.ircbot.send(channel, msg)
256 257
 
257 258
     def change_merged(self, channel, data):
258
-        msg = 'Merged %s: %s  %s' % (
259
+        msg = 'Merged %s %s: %s  %s' % (
259 260
             data['change']['project'],
261
+            data['change']['branch'],
260 262
             data['change']['subject'],
261 263
             data['change']['url'])
262 264
         self.log.info('Compiled Message %s: %s' % (channel, msg))

Loading…
Cancel
Save