Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HI @JoshCoady I just want make sure is this the intended behaviour of the action because \n will be visible in the slack message, I think the PR you merged(v1.0.2) made the \n visible in the output text Like:
The version 1.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bachiri
This the way to use multi-line text in app-generated text for the Slack API, please look https://api.slack.com/reference/surfaces/formatting#line-breaks
I had an issue about it #8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @denist-huma for your response.
To give you more context the input that I'm getting is from Github cli Release notes Example :
{"body":"## What's Changed\n* Test slakify Text by @bachiri in [https://github.com/repo/pull/22\n\n\n**Full].....
So when applying the Slakify action into the input using the version
1.0.0
it works perfectly(The second screen shoot) but when I apply the second version1.0.2
I got the result in the first screenshot .If I'm not mistaken the changes you have done are specific to your case because from what I understood this action is just a wrapper of slackify-markdown which is the best place to push your change(If it applies ).
Can you share the input you are giving the action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bachiri GitHub/Gitlab are expecting to get markdown, WYSIWYG, a string code
\n
for example. But Slack API expects to receive a readable\\n
in string code. Please look https://api.slack.com/reference/surfaces/formatting#line-breaks.This leads to that you got to process the output text that can be displayed in GitHub once more time for Slack API to not to break.
My input from #8 has 2 line breaks in it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree that the changes I have done are specific to my case. I think that it should fix the bug for everybody who use multi-line strings.