Bitbucket webhooks 💩 💩

remotes/origin/issue/4795/notification_even_they_are_disabled
David Barragán Merino 2016-04-01 10:34:27 +02:00
parent 28efb6dd68
commit bca10ae245
1 changed files with 7 additions and 10 deletions

View File

@ -40,19 +40,16 @@ class PushEventHook(BaseEventHook):
changes = self.payload.get("push", {}).get('changes', []) changes = self.payload.get("push", {}).get('changes', [])
for change in filter(None, changes): for change in filter(None, changes):
new = change.get("new", None) commits = target.get("commits", [])
if not new: if not commits:
continue continue
target = new.get("target", None) for commit in commits:
if not target: message = commit.get("message", None)
continue if not message:
continue
message = target.get("message", None) self._process_message(message, None)
if not message:
continue
self._process_message(message, None)
def _process_message(self, message, bitbucket_user): def _process_message(self, message, bitbucket_user):
""" """