Teamwork / github-sync

This action helps you to sync your PRs with tasks in Teamwork to streamline team collaboration and your development workflows.
https://developer.teamwork.com
MIT License
64 stars 26 forks source link

Delete markdown comments #38

Closed seanogdev closed 3 years ago

seanogdev commented 3 years ago

Describe the bug Not sure if this is on teamwork or this addons end, but seeing markdown comments come through as part of the Teamwork comment

To Reproduce Steps to reproduce the behavior:

  1. Create a PR with a markdown comment <!-- Test comment -->
  2. Test comment rendered as a string in Teamwork comment

    <!-- Test comment -->

Expected behavior That markdown comments would not be rendered

Flexicon commented 3 years ago

Hey, what's a real use-case for adding markdown comments to a PR that you don't want to be published to TW?

Just looking for context here 🤔

seanogdev commented 3 years ago

In a lot of PR templates theres often comments like

<!-- Add a link to the task -->

or

<!-- Add a description -->

I dont think thats really valuable in being rendered in Teamwork, curious as to what you think?

Flexicon commented 3 years ago

Ah right fair play. I just saw it there in the PR template for this repo as well. I wasn't aware that that was a feature of Github flavour markdown but yeah I agree. No real value there.

I think that's a thing for the projects Markdown renderer at this point though, unless we use sed or awk to strip out those comments before sending. Might be more trouble than it's worth though at that point.

seanogdev commented 3 years ago

Happy to close if you think so then 👍

Flexicon commented 3 years ago

Yeah I think this should be closed, because from reading this it looks like those html style comments are not a part of standard markdown but just something github allows.

That said, there is a hacky approach to making Markdown "comments" that pretty much any markdown renderer will respect (including the one projects uses, see below) and it is mentioned in that StackOverflow thread too.

markdown rendered
image image
seanogdev commented 3 years ago

does that work in gh flavour markdown 🤔 ?

Flexicon commented 3 years ago

Yep

☝️

Screenshot 2021-08-05 at 15 46 26
Flexicon commented 3 years ago

Again, that's because it's part of the standard markdown syntax, not anything fancy. Just "abusing" link/image labels.