Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use slack-message with incoming webhook. #39

Closed
marcin-lulek-cint opened this issue Dec 8, 2021 · 2 comments
Closed

Cannot use slack-message with incoming webhook. #39

marcin-lulek-cint opened this issue Dec 8, 2021 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@marcin-lulek-cint
Copy link

marcin-lulek-cint commented Dec 8, 2021

Can we have support for using slack-message with incoming webhooks. Right now it seems that only payload key is supported.
The reason for this request is that for example for Pull Request notifications we ended up sometimes with malformed JSON object.

@srajiang srajiang added the enhancement New feature or request label Dec 8, 2021
@srajiang srajiang added this to the 1.17 milestone Dec 8, 2021
@srajiang
Copy link
Contributor

srajiang commented Dec 8, 2021

@marcin-lulek-cint - Thanks for the suggestion and for trying out the Slack Github Action! 🎉

I'll mark this as a feature enhancement request and have set it for our next milestone release.

If you have time to make a contribution, we welcome submissions!

@seratch seratch modified the milestones: 1.17, 1.18 Jan 10, 2022
@seratch seratch modified the milestones: 1.18, 1.19 Jan 27, 2022
@seratch seratch modified the milestones: 1.19, 1.20 May 4, 2022
@seratch seratch modified the milestones: 1.20, 1.x Aug 15, 2022
@zimeg zimeg modified the milestones: 1.x, 2.0 Nov 15, 2024
@zimeg
Copy link
Member

zimeg commented Nov 15, 2024

👋 With the latest @2.0.0 release, the provided input payload of incoming webhooks should match other messaging APIs, meaning text and blocks can be used. Reference.

This is a breaking change that replaces slack-message altogether, meaning an updated step might resemble this:

- name: Post a message in a channel
  uses: slackapi/slack-github-action@v2.0.0
  with:
    webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
    webhook-type: incoming-webhook
    payload: |
      text: "And a new message is posted."

I'll close this issue but am of course open to following up with additional ideas or questions! Thanks too for sharing this suggestion!

@zimeg zimeg closed this as completed Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants