In some situation i need to post a comment on PR from my app, the comment includes bullets, links and more,
Using RestApi v2.0 i success to Post a raw data as comment with the following payload
{"content":{"raw":"change identified : \\nWORKFLOW - 1 · PR test: \\n* extra data added to a test or documentation file (1) \\n * 1. ssl - lines: [#1](https://bitbucket.org/workspace/repo/commits/0fa2cb53ad1c063bd86769abe374c467672862b0#LsslT1) \\n[View in my app](https://localhost:5001/release/xxxxxxxx)"}
}
But I want it to be shown “pretty”/formate for the user,
is it possible? How?
also how can i show the App name as the commenter?
BTW:
i try to send the content payload with some other fields like:
{
"content":
{
"type":"rendered",
"raw":"sldfsds\n\nsdg\n\ndfg\n\n[http://www.ynet.co.il](http://www.ynet.co.il){: data-inline-card='' } ",
"markup":"markdown",
"html":"<p>sldfsds</p>\n<p>sdg</p>\n<p>dfg</p>\n<p><a data-inline-card=\"\" data-is-external-link=\"true\" href=\"http://www.ynet.co.il\" rel=\"nofollow\">http://www.ynet.co.il</a> </p>"
}
}
but i am getting the following error as response:
{
"type": "error",
"error": {
"message": "Bad request",
"fields": {
"content.type": "extra keys not allowed",
"content.markup": "extra keys not allowed",
"content.html": "extra keys not allowed"
}
}
}