diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ac34f33..66a950b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ jobs: steps: - name: Publish to slack id: slack - uses: stevengill/slack-github-action@v1.3.2 + uses: stevengill/slack-github-action@v1.3.3 with: channel-id: 'CTAAHRA79' # slack-message: 'posting from a github action!' diff --git a/index.js b/index.js index 5ead6a9..9cf4e95 100644 --- a/index.js +++ b/index.js @@ -20,7 +20,7 @@ try { throw 'Need to provide at least one botToken or webhookUrl' } - if (botToken) { + if (botToken.length > 0) { const message = core.getInput('slack-message'); const channelId = core.getInput('channel-id'); console.log('message', message, typeof message) @@ -36,7 +36,7 @@ try { } } - if (webhookUrl) { + if (webhookUrl.length > 0) { // send flat payload to webhookUrl const flatPayload = flatten(payload); diff --git a/package.json b/package.json index 0b8c015..58bc816 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "slack-github-action", - "version": "1.3.2", + "version": "1.3.3", "description": "", "main": "index.js", "scripts": {