I am using github's create check run api to create a check run for my PR.
I am passing the request body in the following structure:
{
"name" : name,
"head_sha" : script.env.CI_COMMIT_SHA,
"status" : status,
"details_url": detailsUrl,
"output" : {
"title" : title,
"summary": summary,
"text" : commentText
}
}
The variable commentText
is of datatype String
containing html with inline styles, which looks something like this:
<table>
<tbody>
<tr>
<th>Change</th>
<th>Module Name</th>
</tr>
<tr>
<td style = 'color:orange'>Modified</td>
<td>build_dood_vmss.azurerm_linux_virtual_machine_scale_set.vmss</td>
</tr>
<tr>
<td style = 'color:green'>Added</td>
<td>build_dood_vmss_test.azurerm_linux_virtual_machine_scale_set.vmss</td>
</tr>
<tr>
<td style = 'color:green'>Added</td>
<td>build_dood_vmss_test2.azurerm_linux_virtual_machine_scale_set.vmss</td>
</tr>
<tr>
<td style = 'color:green'>Added</td>
<td>build_dood_vmss_test3.azurerm_linux_virtual_machine_scale_set.vmss</td>
</tr>
</tbody>
</table>
Checks API gives me a success statucode (201 Created) for this body, and the above table is published to checks tab of the PR. But the inline style attributes are somehow ignored and removed from the html. I have verified this by inspecting the published html on the PR from browser.
What do I have to do to retain the inline style attributes? Please help