Skip to content

Commit

Permalink
fix payload parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Naatan committed Apr 23, 2014
1 parent c757e47 commit 912ffec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var server = new function()
bindRoutes();

// Bind schedulers
bindSchedulers();
//bindSchedulers();

// Launch the server
var server = app.listen(8282, function()
Expand Down Expand Up @@ -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("-");
Expand Down

0 comments on commit 912ffec

Please sign in to comment.