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

how does one send a message with a snippet? #337

Closed
5 of 10 tasks
iamstarkov opened this issue Sep 5, 2024 · 2 comments · Fixed by #333
Closed
5 of 10 tasks

how does one send a message with a snippet? #337

iamstarkov opened this issue Sep 5, 2024 · 2 comments · Fixed by #333
Labels
documentation Improvements or additions to documentation duplicate This issue or pull request already exists enhancement New feature or request semver:major
Milestone

Comments

@iamstarkov
Copy link

iamstarkov commented Sep 5, 2024

Description

I'd like to send a nice snippet of code in a message instead of markdown code block.

This is what I do now:
Screenshot 2024-09-05 at 13 30 41

This is what I want:
Screenshot 2024-09-05 at 13 31 02

Im not quite sure how to do it and will appreciate any guiding

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • example code related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

@zimeg zimeg added documentation Improvements or additions to documentation duplicate This issue or pull request already exists enhancement New feature or request semver:major labels Sep 25, 2024
@zimeg
Copy link
Member

zimeg commented Sep 25, 2024

Hi @iamstarkov! 👋 Thanks for sharing the example! The second snippet is showing a file upload with a specific file type instead of block kit blocks or other formatting, which isn't yet possible, but it is good to know of some workaround for this right now.

Support for this is in progress (#333) and also tracked in #92, but let's keep this open since this seems like a useful case to have documented 📚 🙏

@zimeg zimeg added this to the 2.0 milestone Sep 25, 2024
@zimeg zimeg linked a pull request Nov 15, 2024 that will close this issue
8 tasks
@zimeg
Copy link
Member

zimeg commented Nov 15, 2024

This is now possible with the @2.0.0 release! Details on updating are included with that link, but a step like so might be helpful for sending snippets:

- name: Share a file to that channel
  uses: slackapi/[email protected]
  with:
    method: files.uploadV2
    token: ${{ secrets.SLACK_BOT_TOKEN }}
    payload: |
      channel: ${{ secrets.SLACK_CHANNEL_ID }}
      file: "./path/to/api.json"
      filename: "api.json"

I'm going to close this issue for now, but please feel free to comment with follow ups or open another whenever! 🙏

@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
documentation Improvements or additions to documentation duplicate This issue or pull request already exists enhancement New feature or request semver:major
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants