From 644b5ec195a5f8d068445b43a775ea350c9d4357 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Thu, 29 Oct 2020 15:15:20 -0700 Subject: [PATCH] updated github action --- .github/workflows/main.yml | 2 +- index.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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": {