--- a/hooks-queue.py Fri Jul 22 10:29:31 2016 +0800
+++ b/hooks-queue.py Fri Jul 22 10:35:41 2016 +0800
- for change in payload['push']['changes']:
- for head in change['new'].get('heads', []):
- changes.add(head['hash'])
- changes.add(change['new']['target']['hash'])
+ if payload['repository']['scm'] == 'git':
+ for change in payload['push']['changes']:
+ if change['new']['type'] == 'branch':
+ changes.add(change['new']['name'])
+ for change in payload['push']['changes']:
+ for head in change['new'].get('heads', []):
+ changes.add(head['hash'])
+ changes.add(change['new']['target']['hash'])