What's new
- Added support for sending reactions on messages (https://api.slack.com/methods/reactions.add)
- 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)