From a3643b1a25016439bc660a037cb113041b92ee19 Mon Sep 17 00:00:00 2001 From: xuexb Date: Sun, 15 Oct 2017 00:37:21 +0800 Subject: [PATCH] fix: action name is undefined --- src/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app.js b/src/app.js index 7fbf385..7823392 100755 --- a/src/app.js +++ b/src/app.js @@ -22,7 +22,10 @@ app.use(ctx => { const payload = ctx.request.body; const action = payload.action || payload.ref_type; - eventName += `_${action}`; + if (action) { + eventName += `_${action}`; + } + console.log(`receive event: ${eventName}`); if (payload.sender.login !== process.env.GITHUB_BOT_NAME) {