From 912ffecf36ba4c3ce72814a53c344583b63438a4 Mon Sep 17 00:00:00 2001 From: Nathan Rijksen Date: Wed, 23 Apr 2014 13:09:20 -0700 Subject: [PATCH] fix payload parsing --- server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index d8b0d2f..9c42844 100644 --- a/server.js +++ b/server.js @@ -65,7 +65,7 @@ var server = new function() bindRoutes(); // Bind schedulers - bindSchedulers(); + //bindSchedulers(); // Launch the server var server = app.listen(8282, function() @@ -144,10 +144,10 @@ var server = new function() } } - logger.info("Received push event"); + logger.info("Received push event", req.body); // Parse relevant info - var payload = req.body; + var payload = JSON.parse(req.body.payload); var repo = payload.repository.name; var branch = payload.ref.split("/").slice(-1).join("-"); var deployerName = [repo,branch].join("-");