-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Hey! First off — I'm in the middle of setting up this action for pco-payments and it's been a fantastic experience. The documentation is excellent, the rule composability is really well thought out, and the whole thing just clicks. Great work on this.
I ran into something I'm not sure about though. When using create_task with html_notes and the sanitize_markdown helper, the PR body markdown ends up rendered as raw text in Asana rather than rich HTML. Headings show as ##, bullet points as - , tables as pipe characters, backticks stay as backticks, etc.
Here's what it looks like in Asana:
My rule looks like this:
- when:
event: pull_request
action: labeled
label: 'create-asana-task'
has_asana_tasks: false
then:
create_task:
project: '1211523174665896'
workspace: '1202585680506197'
section: '1211533141102704'
title: '{{clean_title pr.title}}'
assignee: '{{map_github_to_asana (or pr.assignee pr.author)}}'
html_notes: '<body>{{sanitize_markdown pr.body}}</body>'My question: Is sanitize_markdown intended to just sanitize/escape the markdown and pass it through as-is? Or should it be converting markdown to HTML for use in html_notes? Am I using the wrong helper, or is there not yet a helper that does markdown → HTML conversion?
Ideally there'd be something like {{markdown_to_html pr.body}} that converts the PR body into proper HTML (<h2>, <strong>, <ul>, <table>, <code>, etc.) so Asana renders it as rich text. Since html_notes accepts HTML, the pieces are all there — it just needs the conversion step.
Thanks again for the great tool!