Skip to content

Releases: slackapi/slack-github-action

Slack Send V1.27.0

28 Aug 20:00
37ebaef
Compare
Choose a tag to compare

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

  • Make payload delimiter configurable in #281 - thanks @rzumer!

📚 Documentation

🔒 Security

🧪 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

19 Apr 00:52
70cd7be
Compare
Choose a tag to compare

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

  • docs(readme): adjust whitespace in env assignment by @paulo9mv in #296

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

New Contributors

Full Changelog: v1.25.0...v1.26.0

Slack Send V1.25.0

26 Jan 21:54
6c661ce
Compare
Choose a tag to compare

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

Full Changelog: v1.24.0...v1.25.0

Slack Send V1.24.0

17 May 21:31
e28cf16
Compare
Choose a tag to compare

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

Full Changelog: v1.23.0...v1.24.0

Slack Send V1.23.0

12 Oct 15:14
007b2c3
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.22.0...v1.23.0

Slack Send V1.22.0

13 Sep 19:03
ebd044f
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.21.0...v1.22.0

Slack Send V1.21.0

27 Jul 23:30
936158b
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.20.0...v1.21.0

Slack Send v1.20.0

27 Jul 18:15
f58766b
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.19.0...v1.20.0

Slack Send V1.19.0

04 May 06:19
34c3fd7
Compare
Choose a tag to compare

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

27 Jan 00:57
16b6c78
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.17.0...v1.18.0