diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7b026f6..ac34f33 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.1 + uses: stevengill/slack-github-action@v1.3.2 with: channel-id: 'CTAAHRA79' # slack-message: 'posting from a github action!' diff --git a/index.js b/index.js index 7e9ec3f..5ead6a9 100644 --- a/index.js +++ b/index.js @@ -28,7 +28,7 @@ try { const web = new WebClient(botToken); - if(channelId !== undefined && message !== undefined) { + if(channelId.length > 0 && message.length > 0) { // post message web.chat.postMessage({text: message, channel: channelId}); } else { diff --git a/package.json b/package.json index 19e0130..0b8c015 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "slack-github-action", - "version": "1.3.1", + "version": "1.3.2", "description": "", "main": "index.js", "scripts": {