Commit 8092379b authored by Laurent Peuch's avatar Laurent Peuch
Browse files

feat(qa): add number of MRs / number of topics column

parent 5091ee454a8b
Pipeline #14866 passed with stages
in 3 minutes and 54 seconds
...@@ -111,6 +111,10 @@ table.qa .false { ...@@ -111,6 +111,10 @@ table.qa .false {
background-color: lightsalmon; background-color: lightsalmon;
} }
table.qa .warning {
background-color: yellow;
}
table.qa td.readthedocs { table.qa td.readthedocs {
text-align: center; text-align: center;
} }
......
...@@ -42,6 +42,8 @@ for number, cube in enumerate(all_cubes): ...@@ -42,6 +42,8 @@ for number, cube in enumerate(all_cubes):
has_doc = bool({"doc", "docs"} & cube_files) # set intersection has_doc = bool({"doc", "docs"} & cube_files) # set intersection
has_readthedocs = requests.get(f"https://cubicweb-{cube_normalized_name}.readthedocs.io").status_code == 200 has_readthedocs = requests.get(f"https://cubicweb-{cube_normalized_name}.readthedocs.io").status_code == 200
number_of_mrs = len([mr for mr in cube.mergerequests.list(all=True) if mr.state == "opened"])
number_of_topics = len([x for x in cube.branches.list() if x.name.startswith("topic/")])
# will be set after # will be set after
has_capture_deprecation_warnings = None has_capture_deprecation_warnings = None
...@@ -115,6 +117,8 @@ for number, cube in enumerate(all_cubes): ...@@ -115,6 +117,8 @@ for number, cube in enumerate(all_cubes):
"has_flake8": has_flake8, "has_flake8": has_flake8,
"has_from_forge": has_from_forge, "has_from_forge": has_from_forge,
"has_capture_deprecation_warnings": has_capture_deprecation_warnings, "has_capture_deprecation_warnings": has_capture_deprecation_warnings,
"number_of_mrs": number_of_mrs,
"number_of_topics": number_of_topics,
}) })
context["cubes"] = sorted(context["cubes"], key=lambda x: x["cube"]["name"].lower()) context["cubes"] = sorted(context["cubes"], key=lambda x: x["cube"]["name"].lower())
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<th>mypy</th> <th>mypy</th>
<th>from forge</th> <th>from forge</th>
<th>capture deprecationwarnings</th> <th>capture deprecationwarnings</th>
<th>number of MRs / number of topics</th>
</tr> </tr>
{%- endmacro %} {%- endmacro %}
...@@ -61,6 +62,17 @@ ...@@ -61,6 +62,17 @@
<td></td> <td></td>
<td></td> <td></td>
{% endif %} {% endif %}
{% if cube["number_of_mrs"] == 0 and cube["number_of_topics"] == 0 %}
<td class="">
{% elif cube["number_of_mrs"] == cube["number_of_topics"] %}
<td class="true">
{% elif cube["number_of_mrs"] < cube["number_of_topics"] %}
<td class="warning">
{% else %}
<td class=""> <!-- wat -->
{% endif %}
{{ cube["number_of_mrs"] }} / {{ cube["number_of_topics"] }}
</td>
</tr> </tr>
{%- endmacro %} {%- endmacro %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment