summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xapi.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/api.py b/api.py
index 0fcb26a..1ddc4df 100755
--- a/api.py
+++ b/api.py
@@ -322,6 +322,7 @@ class VCSWorker(API):
url,
'-sv', '-X' 'POST',
'-d', 'url=%s' % webhook_url,
+ '-d', 'push_events=false',
'-d', 'job_events=true',
'-HPRIVATE-TOKEN: %s' % token,
]
@@ -459,7 +460,10 @@ class Controller(API):
def _webhook(self):
r = bottle.request
obj = r.json
- logging.debug('_webhook called: %r', obj)
+ kind = obj.get('object_kind')
+ if kind == 'build':
+ kind = obj.get('object_kind')
+ logging.debug('build web hook called: %r', obj)
def runcmd(cwd, argv, timeout):