-
Notifications
You must be signed in to change notification settings - Fork 19
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
update test to work with changes from #9 #12
Conversation
🎉 This PR is included in version 1.0.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
||
• List Item 1 | ||
• List Item 2 | ||
EXPECTED: '*Heading 1*\n\n*Heading 2*\n\n<http://example.com|Link>\n\n• List Item 1\n• List Item 2\n' |
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:
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 version 1.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.
**Your server API is ready to use.✅**
The server API links:
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.
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 ).
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.
does 1.0.1 have the intended look? |
Yes |
For me it is counterintuitive to write a JS code, as I spent most time writing C/C++/Golang,Python and Shell code. I would even prefer to write a shell patch to the JS code in a Github Action, but that was not a suitable solution. because of the way the GHA process outputs. |
No description provided.