summaryrefslogtreecommitdiff
path: root/api.py
diff options
context:
space:
mode:
Diffstat (limited to 'api.py')
-rwxr-xr-xapi.py13
1 files 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)