From 277ce71959b104390fdee7d1f548060eca71dbbc Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Thu, 9 Feb 2017 18:29:44 +0800 Subject: [PATCH] Fix recipients assignment --- scripts/hubot-kredts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/hubot-kredts.js b/scripts/hubot-kredts.js index 00c8588..c9954b4 100644 --- a/scripts/hubot-kredts.js +++ b/scripts/hubot-kredts.js @@ -63,7 +63,7 @@ const fetch = require('node-fetch'); if (assignees.length > 0) { recipients = assignees; } else { - recipients.push(issue.user.login); + recipients = [issue.user.login]; } recipients.forEach(recipient => { @@ -86,7 +86,7 @@ const fetch = require('node-fetch'); if (assignees.length > 0) { recipients = assignees; } else { - recipients.push(pull_request.user.login); + recipients = [pull_request.user.login]; } fetch(pr_issue_url)