Releases: slackapi/slack-github-action
Slack Send V1.27.0
What's changed
This release introduces an optional payload-delimiter
parameter for flattening nested objects with a customized delimiter before the payload is sent to Slack Workflow Builder when using workflow webhook triggers.
- name: Send a custom flattened payload
uses: slackapi/slack-github-action@v1.27.0
+ with:
+ payload-delimiter: "_"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
Setting this value to an underscore (_
) is recommended when using nested inputs within Workflow Builder to match expected input formats of Workflow Builder, but the actual value can be changed to something else! This "flattening" behavior did exist prior to this version, but used a period (.
) which is not valid for webook inputs in Workflow Builder.
Flattening example
The resulting output of flattened objects is not always clear, but the following can hopefully serve as a quick reference as well as these specs when using _
as the delimiter:
Input:
{
"apples": "tree",
"bananas": {
"truthiness": true
}
}
Output:
{
"apples": "tree",
"bananas_truthiness": "true"
}
Notice that bananas_truthiness
is also stringified in this process, as part of updating values to match the expected inputs of Workflow Builder!
Changes
In addition to the changes above, the following lists all of the changes since the prior version with the complete changelog changes found here: v1.26.0...v1.27.0
🎁 Enhancements
📚 Documentation
- doc: how to reply to a message in #309 - thanks @WilliamBergamin!
🔒 Security
- chore(deps): bump axios to 1.7.5 to address CVE-2024-39338 in #332 - thanks @zimeg!
🧪 Maintenance
- Add codecov coverage uploading in #308 - thanks @filmaj!
- ci(test): run integration tests in a single sequential environment in #310 - thanks @zimeg!
📦 Dependencies
- Bump eslint-plugin-jsdoc from 48.2.2 to 48.2.3 in #305 - thanks @dependabot!
- Bump @slack/web-api from 7.0.2 to 7.0.4 in #307 - thanks @dependabot!
- build(deps-dev): bump sinon from 17.0.1 to 18.0.0 in #313 - thanks @dependabot!
- build(deps-dev): bump eslint-plugin-jsdoc from 48.2.3 to 48.2.7 in #314 - thanks @dependabot!
- build(deps): bump axios from 1.6.8 to 1.7.2 in #315 - thanks @dependabot!
- build(deps): bump codecov/codecov-action from 4.0.1 to 4.4.1 in #316 - thanks @dependabot!
- build(deps-dev): bump nyc from 15.1.0 to 17.0.0 in #319 - thanks @dependabot!
- build(deps-dev): bump eslint-plugin-jsdoc from 48.2.7 to 48.5.0 in #321 - thanks @dependabot!
- build(deps-dev): bump mocha from 10.4.0 to 10.5.2 in #322 - thanks @dependabot!
- build(deps): bump codecov/codecov-action from 4.4.1 to 4.5.0 in #324 - thanks @dependabot!
- build(deps): bump @slack/web-api from 7.0.4 to 7.2.0 in #323 - thanks @dependabot!
- build(deps): bump https-proxy-agent from 7.0.4 to 7.0.5 in #320 - thanks @dependabot!
- build(deps-dev): bump eslint-plugin-jsdoc from 48.5.0 to 48.10.2 in #325 - thanks @dependabot!
- build(deps-dev): bump chai from 4.4.1 to 4.5.0 in #326 - thanks @dependabot!
- build(deps): bump @slack/web-api from 7.2.0 to 7.3.2 in #327 - thanks @dependabot!
- build(deps-dev): bump mocha from 10.5.2 to 10.7.0 in #328 - thanks @dependabot!
🎉 New contributors
Slack Send V1.26.0
What's Changed
This release provides an escape hatch for sending the JSON content of a payload file exactly as is, without replacing any templated variables!
Previously a payload file was parsed and templated variables were replaced with values from github.context
and github.env
. Any undefined variables were replaced with ???
in this process, which might have caused questions.
That remains the default behavior, but now the JSON contents of a payload file can be sent exactly as written by setting the payload-file-path-parsed
input to false
:
- name: Send custom JSON data to Slack workflow
id: slack
uses: slackapi/slack-github-action@v1.26.0
with:
payload-file-path: "./payload-slack-content.json"
payload-file-path-parsed: false
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
With this change, the contents of the example payload-slack-content.json
will be sent to a webhook URL exactly as is!
Recent commits
Enhancements
- allow to use json file as is without replacing/parsing anything by @talgendler in #299
Documentation
Maintenance
- ci(test): collect environment secrets from a prepared staging environment by @zimeg in #294
- ci(test): share environment secrets with pull requests from forked prs by @zimeg in #297
Dependencies
- Bump eslint-plugin-jsdoc from 46.10.1 to 48.2.1 by @dependabot in #295
- Bump eslint from 8.56.0 to 8.57.0 by @dependabot in #289
- Bump mocha from 10.2.0 to 10.3.0 by @dependabot in #288
- Bump https-proxy-agent from 7.0.2 to 7.0.4 by @dependabot in #290
- Bump @slack/web-api from 6.12.0 to 7.0.2 by @dependabot in #287
- Bump mocha from 10.3.0 to 10.4.0 by @dependabot in #300
- Bump axios from 1.6.7 to 1.6.8 by @dependabot in #301
- Bump eslint-plugin-jsdoc from 48.2.1 to 48.2.2 by @dependabot in #302
New Contributors
- @paulo9mv made their first contribution in #296
- @talgendler made their first contribution in #299
Full Changelog: v1.25.0...v1.26.0
Slack Send V1.25.0
What's Changed
- Update payload integration test to escape invalid characters by @hello-ashleyintech in #207
- #204: Handle proxies when using Slack WebClient by @raihle in #205
- README: clarify limitations to workflow builder approach by @ryan-williams in #228
- Add instructions for developing with a local version of the action by @zimeg in #250
- Pass secrets to approved workflow jobs by @zimeg in #258
- build(node): bump the runtime version to node 20 by @zimeg in #267
- ci(security): require access checks to pass before running unit tests by @zimeg in #279
- ci(security): check for pull_request_target events in the access check by @zimeg in #282
New Contributors
- @raihle made their first contribution in #205
- @ryan-williams made their first contribution in #228
- @zimeg made their first contribution in #250
Full Changelog: v1.24.0...v1.25.0
Slack Send V1.24.0
What's Changed
- Add in testing instructions for maintainer's guide and standardize bullet point punctuation by @hello-ashleyintech in #140
- Added checks for bot token and webhook url length by @koki-develop in #124
- Add channel_id output parameter by @maso7 in #149
- [#171] Update Technique 2 to use Actions context instead of values property by @mwbrooks in #172
- Fix interpolation of variables in file-based payloads by @filmaj in #200
- Update README.md with variable usage and links to example workflows by @filmaj in #201
New Contributors
- @koki-develop made their first contribution in #124
- @maso7 made their first contribution in #149
- @mwbrooks made their first contribution in #172
- @hnarimiya made their first contribution in #200
Full Changelog: v1.23.0...v1.24.0
Slack Send V1.23.0
What's Changed
- Bump node from 12 to 16 by @quinnjn in #128
- Bump eslint from 8.23.0 to 8.24.0 by @dependabot in #135
- Bump @actions/core from 1.9.1 to 1.10.0 by @dependabot in #134
- Bump @actions/github from 5.0.3 to 5.1.1 by @dependabot in #133
- Use https proxy agent by @EHitchcockIAG in #132
- Release v1.23.0 by @hello-ashleyintech in #139
New Contributors
- @quinnjn made their first contribution in #128
- @EHitchcockIAG made their first contribution in #132
- @hello-ashleyintech made their first contribution in #139
Full Changelog: v1.22.0...v1.23.0
Slack Send V1.22.0
What's Changed
- feat(message): support multiple channel IDs by @treemmett in #126 (fixes #118)
New Contributors
- @treemmett made their first contribution in #126
Full Changelog: v1.21.0...v1.22.0
Slack Send V1.21.0
What's Changed
- updated to 1.21.0, fixed update-ts by @stevengill in #110
Full Changelog: v1.20.0...v1.21.0
Slack Send v1.20.0
What's Changed
- Bump @actions/github from 5.0.1 to 5.0.3 by @dependabot in #94
- Bump @vercel/ncc from 0.33.4 to 0.34.0 by @dependabot in #98
- Bump eslint-plugin-jsdoc from 39.2.9 to 39.3.2 by @dependabot in #96
- Bump eslint from 8.14.0 to 8.16.0 by @dependabot in #99
- Bump @actions/core from 1.7.0 to 1.8.2 by @dependabot in #100
- Bump mocha from 9.2.2 to 10.0.0 by @dependabot in #97
- Bump sinon from 13.0.2 to 14.0.0 by @dependabot in #95
- README.md: Fix typo by @cclauss in #102
- Bump @actions/core from 1.8.2 to 1.9.0 by @dependabot in #105
- Bump eslint from 8.16.0 to 8.18.0 by @dependabot in #106
- Bump eslint-plugin-jsdoc from 39.3.2 to 39.3.3 by @dependabot in #107
- Bump @slack/web-api from 6.7.1 to 6.7.2 by @dependabot in #108
- Add support to update messages #75 by @kuboon in #109
New Contributors
Full Changelog: v1.19.0...v1.20.0
Slack Send V1.19.0
What's Changed
- fixed #51 for env variables in payload json file by @nitintejuja in #71
- #73 added thread-ts as an output by @stevengill in #74
Full Changelog: v1.18.0...v1.19.0
Slack Send v1.18.0
What's Changed
- Improve the readability of example payloads by @seratch in #47
- Fixed bug with payload-file-path by @stevengill in f703d28
Full Changelog: v1.17.0...v1.18.0