github archive/github-actions-slack v2.0.0

latest releases: v2.9.0, v2.8.0, v2.7.0...
3 years ago

What's new

  • Improved output from the action. It's now a plain json string (not wrapped in an array) with a response object, that contains all the things you need if you are later going to send a reaction to the message
{
  "statusCode": 200,
  "statusMessage": "OK",
  "ok": true,
  "result": "<deprecated - same as response but as string>",
  "response": {
    "ok": true,
    "channel": "XXXX",
    "ts": "1612623790.009600",
    "message": {
      "type": "message",
      "subtype": "bot_message",
      "text": "Lipsum",
      "ts": "1612623790.009600",
      "username": "Lipsum",
      "bot_id": "XXXX"
    }
  }
} 
  • Improved way of reporting errors to action runner

Breaking change

This is only important if you are parsing the result from the action

In v1.x there was a bug, that made the result of the action to be wrapped in an array. This made it hard to parse and to use the result from the action. Luckily the majority didn't care about the result :) .

But if you have a script the parse the slack-result, please use something like this to get the json values:

run: echo "${{ steps.send-message.outputs.slack-result }}"

or

run: echo "${{ fromJson(steps.send-message.outputs.slack-result).response.channel }}"

(See https://github.com/archive/github-actions-slack/blob/v2.0.0/.github/workflows/slack-reaction.yml)

Don't miss a new github-actions-slack release

NewReleases is sending notifications on new releases.