From 1d0dd9914b5472525b26bf5c20960b934f32815c Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Tue, 23 Jul 2019 19:48:07 +0300 Subject: Change: logging of webhook --- api.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/api.py b/api.py index d5f83da..cd909ac 100755 --- a/api.py +++ b/api.py @@ -461,14 +461,11 @@ class Controller(API): r = bottle.request obj = r.json kind = obj.get('object_kind') - if kind == 'build': - fields = [ - 'project_name', - 'build_id', - 'build_status', - ] - for f in fields: - logging.debug('_webhook: %s', obj.get(f)) + r = obj.get('repository') + if kind == 'build' and r is not None: + name = r.get('name') + status = r.get('build_status') + logging.info('Repository %s build status %s', name, status) -- cgit v1.2.1