From 7d8c6032c997190a215424f6c6e356ea42c07061 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Sat, 13 May 2017 16:36:48 +0200 Subject: [PATCH] Fix payload parsing --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index e562634..a744c77 100644 --- a/index.js +++ b/index.js @@ -248,7 +248,7 @@ const Web3 = require('web3'); let data = req.body; // For some reason data is contained in a payload property on one // machine, but directly in the root of the object on others - if (data.payload) { data = data.payload; } + if (data.payload) { data = JSON.parse(data.payload); } robot.logger.info(`Received GitHub hook. Event: ${evt}, action: ${data.action}`);