From bca10ae245eca7bab3fecf62bf56db019297ed44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Fri, 1 Apr 2016 10:34:27 +0200 Subject: [PATCH] Bitbucket webhooks :poop: :poop: --- taiga/hooks/bitbucket/event_hooks.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/taiga/hooks/bitbucket/event_hooks.py b/taiga/hooks/bitbucket/event_hooks.py index a4a8c00d..b1f709e6 100644 --- a/taiga/hooks/bitbucket/event_hooks.py +++ b/taiga/hooks/bitbucket/event_hooks.py @@ -40,19 +40,16 @@ class PushEventHook(BaseEventHook): changes = self.payload.get("push", {}).get('changes', []) for change in filter(None, changes): - new = change.get("new", None) - if not new: + commits = target.get("commits", []) + if not commits: continue - target = new.get("target", None) - if not target: - continue + for commit in commits: + message = commit.get("message", None) + if not message: + continue - message = target.get("message", None) - if not message: - continue - - self._process_message(message, None) + self._process_message(message, None) def _process_message(self, message, bitbucket_user): """