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

update test to work with changes from #9 #12

Merged
merged 7 commits into from
Aug 30, 2023
Merged

update test to work with changes from #9 #12

merged 7 commits into from
Aug 30, 2023

Conversation

JoshCoady
Copy link
Contributor

No description provided.

@JoshCoady JoshCoady merged commit d4652e3 into master Aug 30, 2023
4 checks passed
@JoshCoady JoshCoady deleted the fix-test branch August 30, 2023 15:34
@github-actions
Copy link

🎉 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'
Copy link
Contributor

@bachiri bachiri Aug 30, 2023

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:
Captura de pantalla 2023-08-30 a las 17 48 04

The version 1.0.0
Captura de pantalla 2023-08-30 a las 17 50 27

Copy link

@denist-huma denist-huma Aug 30, 2023

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

Copy link
Contributor

@bachiri bachiri Aug 30, 2023

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?

Copy link

@denist-huma denist-huma Aug 31, 2023

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:

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.

@JoshCoady
Copy link
Contributor Author

does 1.0.1 have the intended look?
My intent would not be for the literal \n to show up, but I dont currently use this atm

@bachiri
Copy link
Contributor

bachiri commented Aug 30, 2023

Yes 1.0.1 would work , I just want to make sure that the behaviour is intended, So in the future if any update is needed it would be updated upon the right behaviour.
Because as the library mentions it's a wrapper around slackify-markdown and any misbehaviour should be handled in the slackifyMarkdown(markdown) function level.
And thank you all for your reactivity. 🙌

@denist-huma
Copy link

Yes 1.0.1 would work , I just want to make sure that the behaviour is intended, So in the future if any update is needed it would be updated upon the right behaviour. Because as the library mentions it's a wrapper around slackify-markdown and any misbehaviour should be handled in the slackifyMarkdown(markdown) function level. And thank you all for your reactivity. 🙌

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants