From b91c7e2ff3852411ad4fbdad441a8133221ac86e Mon Sep 17 00:00:00 2001 From: Anders Date: Sun, 26 Mar 2023 23:03:15 +0200 Subject: [PATCH] Remove "as_user" since it has be deprecated by Slack for new Apps (#61) --- .../1-slack-notification-with-optional-parameters.yml | 1 - .github/workflows/10-slack-fake-build-updates.yml | 2 +- README.md | 1 - action.yml | 6 +++--- integration-test/end-to-end.js | 2 -- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/1-slack-notification-with-optional-parameters.yml b/.github/workflows/1-slack-notification-with-optional-parameters.yml index c7e2804..ef73f95 100644 --- a/.github/workflows/1-slack-notification-with-optional-parameters.yml +++ b/.github/workflows/1-slack-notification-with-optional-parameters.yml @@ -17,7 +17,6 @@ jobs: slack-channel: C02HEBQP46T slack-text: "Test 1 - :fire:" slack-optional-icon_emoji: ":fire:" - slack-optional-as_user: false - name: Result from "Send Slack Message" run: echo '${{ steps.send-message.outputs.slack-result }}' diff --git a/.github/workflows/10-slack-fake-build-updates.yml b/.github/workflows/10-slack-fake-build-updates.yml index 1915a61..562ff93 100644 --- a/.github/workflows/10-slack-fake-build-updates.yml +++ b/.github/workflows/10-slack-fake-build-updates.yml @@ -5,7 +5,7 @@ on: [push] jobs: slack-action: #if: ${{ false }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-lates name: Test 10 [ubuntu-20.04] steps: diff --git a/README.md b/README.md index 717ff1c..dd02741 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,6 @@ jobs: slack-channel: CPPUV5KU0 #USE CHANNEL ID, NOT CHANNEL NAME, SINCE ID IS USED IN NEW SLACK API's slack-text: Hello! Something is burning! Or not... slack-optional-icon_emoji: ":fire:" - slack-optional-as_user: false - name: Result from "Send Message" run: echo "The result was ${{ steps.notify.outputs.slack-result }}" ``` diff --git a/action.yml b/action.yml index c41d4b2..932c18b 100644 --- a/action.yml +++ b/action.yml @@ -16,9 +16,9 @@ inputs: slack-blocks: description: "Blocks" required: false - slack-optional-as_user: - description: "https://api.slack.com/methods/chat.postMessage#arg_as_user" - required: false + #slack-optional-as_user: - THIS HAS BEEN DEPRECATED BY SLACK - https://twitter.com/SlackAPI/status/1288171767887024130 + # description: "https://api.slack.com/methods/chat.postMessage#arg_as_user" + # required: false slack-optional-attachments: description: "https://api.slack.com/methods/chat.postMessage#arg_attachments" required: false diff --git a/integration-test/end-to-end.js b/integration-test/end-to-end.js index b419ece..5ab05c9 100644 --- a/integration-test/end-to-end.js +++ b/integration-test/end-to-end.js @@ -11,7 +11,6 @@ const buildUpdateMessage = require("../src/update-message/build-update-message") const testSendMessage = async (channel, token, text, optional = {}) => { const message = buildMessage(channel, text, null, { - as_user: false, icon_emoji: ":fire:", ...optional, }); @@ -23,7 +22,6 @@ const testSendMessage = async (channel, token, text, optional = {}) => { const testSendReaction = async (channel, token) => { const message = buildMessage(channel, "Test 2 - testSendReaction 🤓", null, { - as_user: false, icon_emoji: ":fire:", }); const messageToReactTo = await apiPostMessage(token, message);