Open fsintegrations opened 10 months ago
Hey @fsintegrations 👋
Thank you for bringing this to our notice, and sorry for not getting to it sooner. Special characters have been a recurring issue with this orb, and we have tried, without much success (😅), to escape them manually using Bash.
We are trying a different approach now. We have a proof-of-concept Slack orb wholly written in Go, which means that we can leverage built-in libraries to do the special characters escaping inside the JSON templates for us.
Would you be open to trying it and seeing if it solves your issue? We are looking for some early feedback. All you have to do is replace the orb version 4.12.0
in your config with dev:4463bcaee946c1e91829fdf6b3e0d1a7b6f12210
:
version: 2.1
orbs:
- slack: circleci/slack@4.12.0
+ slack: circleci/slack@dev:4463bcaee946c1e91829fdf6b3e0d1a7b6f12210
Please remember that dev:4463bcaee946c1e91829fdf6b3e0d1a7b6f12210
is a proof-of-concept, so it doesn't have feature parity with v4.12.0
. As of the time of this writing, it doesn't support sub-shells expansions inside the templates:
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "$(cat /tmp/msg)"
}
}
]
}
Thanks in advance, and let us know if it works for you! 🙇
Warning
dev:4463bcaee946c1e91829fdf6b3e0d1a7b6f12210
will be deleted after 90 days (January 22, 2024). Remember to roll back to a production version before the developer version gets deleted.
Orb version:
4.12.0
What happened:
Orb crashes with error
unexpected EOF while looking for matching
''` when the commit message or PR title contains an apostropheExpected behavior:
Slack notification should works fine even with apostrophe in message content
Additional Information:
Commit message that crashed the slack notification![image](https://github.com/CircleCI-Public/slack-orb/assets/46435009/4ba33bff-163d-4a65-b7e2-e3ec80faa4ff)
Adding flow to allowed attributes so that it's not skipped.
I could see this issue is already in closed state but we still face this issue if the commit message or PR title contains apostrophe (') https://github.com/CircleCI-Public/slack-orb/issues/186 https://github.com/CircleCI-Public/slack-orb/pull/198