Skip to content

Commit

Permalink
Fix formatting issues in pr_comment.txt
Browse files Browse the repository at this point in the history
Signed-off-by: Tarun Arora <[email protected]>
  • Loading branch information
Tarun-Arora committed Aug 26, 2023
1 parent 5829ba3 commit 423a095
Showing 1 changed file with 21 additions and 32 deletions.
53 changes: 21 additions & 32 deletions templates/ci/pr_comment.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,30 @@
<b>CCExtractor CI platform</b> finished running the test files on <b>{{platform}}</b>. Below is a summary of the test
results:
<b>CCExtractor CI platform</b> finished running the test files on <b>{{platform}}</b>. Below is a summary of the test results:
<table>
<thead>
<td> Report Name </td>
<td> Tests Passed </td>
</thead>
{% for test in tests%}
<tr>
<td> {{test.category}} </td>
{% if test.success==None %}
<td> <b> 0/{{test.total}} </b> </td>
{% elif test.success == test.total %}
<td> {{test.success}}/{{test.total}} </td>
{% else %}
<td> <b> {{test.success}}/{{test.total}} </b> </td>
{% endif %}
</tr>
{% endfor %}
<thead>
<td> Report Name </td>
<td> Tests Passed </td>
</thead>
{% for test in tests%}
<tr>
<td> {{test.category}} </td>
{% if test.success==None %}
<td> <b> 0/{{test.total}} </b> </td>
{% elif test.success == test.total %}
<td> {{test.success}}/{{test.total}} </td>
{% else %}
<td> <b> {{test.success}}/{{test.total}} </b> </td>
{% endif %}
</tr>
{% endfor %}
</table>
{% if state == "failure" %}
It seems that not all tests were passed completely. This is an indication that the output of some files is not as
expected (but might be according to you).
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you).

Your PR breaks these cases:
<ul>
{% for test in failed_tests %}
<li> ccextractor {{ test.command }}
<a href="{{ url_for('sample.sample_by_id', sample_id=test.sample.id, _external=True) }}">
{{ test.sample.sha[:10] }}..., Last passed:
</a>
{% if test.last_passed_on %}
<a href="{{ url_for('test.by_id', test_id=test.last_passed_on, _external=True) }}">Test {{ test.last_passed_on }}</a>
{% else %}
<span>Never</span>
{% endif %}
</li>
{% endfor %}
{% for test in failed_tests %}
<li> ccextractor {{ test.command }} <a href="{{ url_for('sample.sample_by_id', sample_id=test.sample.id, _external=True) }}">{{ test.sample.sha[:10] }}...</a>, Last passed: {% if test.last_passed_on %}<a href="{{ url_for('test.by_id', test_id=test.last_passed_on, _external=True) }}">Test {{ test.last_passed_on }}</a>{% else %}<span>Never</span>{% endif %}</li>
{% endfor %}
</ul>
{% else %}
All tests were passed completely.
Expand Down

0 comments on commit 423a095

Please sign in to comment.