mattermost / mattermost-plugin-starter-template

Build scripts and templates for writing Mattermost plugins.
https://developers.mattermost.com/extend/plugins/
Apache License 2.0
128 stars 120 forks source link

fix: replace any backticks (`) in manifestStr #196

Open NeilHanlon opened 7 months ago

NeilHanlon commented 7 months ago

Summary

if manifestStr (read from plugin.json) has any '' characters in it, such as when using markdown formatting in a text value, the generated go code fails to build due to unescaped '' characters, leading the compiler to believe some input is mismatched.

This change passes the manifestStr through a Replacement filter to replace the ` characters with input which will be properly formatted through the compiler.

Ticket Link

n/a

mattermost-build commented 7 months ago

Hello @NeilHanlon,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

Per the Mattermost Contribution Guide, we need to add you to the list of approved contributors for the Mattermost project.

Please help complete the Mattermost contribution license agreement? Once you have signed the CLA, please comment with /check-cla and confirm that the CLA check is green.

This is a standard procedure for many open source projects.

Please let us know if you have any questions.

We are very happy to have you join our growing community! If you're not yet a member, please consider joining our Contributors community channel to meet other contributors and discuss new opportunities with the core team.

NeilHanlon commented 7 months ago

/check-cla

NeilHanlon commented 7 months ago

Thanks for the contribution @NeilHanlon 👍

While the fix seems reasonable, I would like to see a test that verifies that the newly generated manifest is valid.

Absolutely! I will add some tests later--I also found an issue with the typescript generator, as well.. Will have to think about that a bit, unless you have any immediate thoughts on how to support markdown in plugin.json (e.g. https://github.com/rocky-linux/mattermost-plugin-community-toolkit/blob/master/plugin.json)

mattermost-build commented 6 months ago

This PR has been automatically labelled "stale" because it hasn't had recent activity. A core team member will check in on the status of the PR to help with questions. Thank you for your contribution!

mattermost-build commented 6 months ago

This PR has been automatically labelled "stale" because it hasn't had recent activity. A core team member will check in on the status of the PR to help with questions. Thank you for your contribution!