Reputation: 181
SonarQube has webservice api to add comment api/issues/add_comment.This webservice api takes parameter as issue_id and text. I want to add html text not the plain text. whatever text, i am passing , it consider as normal text. How to pass htmlText/markdown as comment using webserive add comment api Example :
http://localhost:9000/api/issues/add_comment?text="<a href="http://www.link.com" target="_blank">visit this issue</a>" &issue=abcd-e0a3-49dc-9d46-45bf92748361
The above api writes everything as normal text in sonar issue comment section.
Upvotes: 0
Views: 516
Reputation: 26843
This is not possible to post a comment in HTML format, simply to avoid security issues like XSS.
The "text" parameter accepts SonarQube Markdown format, for which you can see the online documentation at https://sonarqube.com/markdown/help
Upvotes: 2