Added checks for bot token and webhook url length (#124)

This commit is contained in:
Koki Sato
2022-10-25 10:49:52 -07:00
committed by GitHub
parent 4466b609d3
commit 0591a83d97
+1 -1
View File
@@ -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');
}