Hi @zricethezav Welcome back to the forums!! Thanks for this feedback on the blog post from @konradpabjan - I’m tagging them in this thread so they can see it
In case it’s helpful for you or anyone else who comes across this thread: Here are a couple of other posts on Actions that might be helpful:
I appreciate the links. I’ve definitely spent some time combing through the docs and blog posts on GitHub Actions. Great stuff all around!
Specifically for my original post I was hoping to find an example of a GitHub Action either:
rendering markdown using the @actions/core node library
or
nesting core.summary objects. so for example, being able to nest .addLink within .addTable would be nice. It looks like this is in the example of Markdown tables and hover cards with @mentions in the blog.
core.summary isn’t designed to render Markdown nor to support nesting.
The methods generate HTML, apparently the subset that is allowed on GitHub in Markdown, but there is nothing to take Markdown in and output the corresponding HTML. AFAIK, you can generally have HTML in Markdown, and the outer Markdown will be rendered as expected, but if you nest Markdown in HTML in Markdown, the inner Markdown won’t be rendered.
The problem with the addLink() and other methods is that they append to an internal buffer. The addTable() method would need them to return the generated HTML as a string, however. You can’t make use of the wrap() method either, because it is defined as private. What should work is to pass HTML strings to addTable(). You could copy some of the toolkit code to your own code to make generating HTML a little bit more convenient.
Other than that, I don’t see how you could utilized the toolkit code for what you asked for, but feel free to take a look at the code for yourself:
I think so, yeah. They are easy to create in Markdown. On the other hand, using HTML or core.summary has the advantage that you can make use of colspan and rowspan in tables.