From 0591a83d97c714275147191f3660dde09458554e Mon Sep 17 00:00:00 2001 From: Koki Sato Date: Wed, 26 Oct 2022 02:49:52 +0900 Subject: [PATCH] Added checks for bot token and webhook url length (#124) --- src/slack-send.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slack-send.js b/src/slack-send.js index e204c04..f519836 100644 --- a/src/slack-send.js +++ b/src/slack-send.js @@ -25,7 +25,7 @@ module.exports = async function slackSend(core) { webhookType = process.env.SLACK_WEBHOOK_TYPE.toUpperCase(); } - if (botToken === undefined && webhookUrl === undefined) { + if ((botToken === undefined || botToken.length <= 0) && (webhookUrl === undefined || webhookUrl.length <= 0)) { throw new Error('Need to provide at least one botToken or webhookUrl'); }