'Work needed' now gives a small priority malus

This commit is contained in:
Alexandre Aubin 2017-03-11 23:09:59 -05:00
parent b2efb12e96
commit f1f658945c
2 changed files with 10 additions and 14 deletions

View file

@ -43,8 +43,6 @@ def priority(pr):
base_priority = 100 base_priority = 100
elif "opinion needed" in pr["labels"]: elif "opinion needed" in pr["labels"]:
base_priority = 50 base_priority = 50
elif "work needed" in pr["labels"]:
base_priority = -50
elif "postponed" in pr["labels"]: elif "postponed" in pr["labels"]:
base_priority = -100 base_priority = -100
elif "inactive" in pr["labels"]: elif "inactive" in pr["labels"]:
@ -52,6 +50,9 @@ def priority(pr):
else: else:
base_priority = 0 base_priority = 0
if "work needed" in pr["labels"]:
base_priority += -5
if "dying" in pr["labels"] and base_priority > -100: if "dying" in pr["labels"] and base_priority > -100:
base_priority += 5 base_priority += 5

View file

@ -79,10 +79,10 @@
<tr class="{% for team in pr.teams %}team-{{ team }} {% endfor %}"> <tr class="{% for team in pr.teams %}team-{{ team }} {% endfor %}">
<td> <td>
<center><a class="btn <center><a class="btn
{% if pr.priority >= 100 %}btn-warning{% else %} {% if pr.priority >= 90 %}btn-warning{% else %}
{% if pr.priority >= 50 %}btn-primary{% else %} {% if pr.priority >= 40 %}btn-primary{% else %}
{% if pr.priority >= 0 %}btn-info{% else %} {% if pr.priority >= -10 %}btn-info{% else %}
{% if pr.priority >= -50 %}btn-default{% else %} {% if pr.priority >= -60 %}btn-default{% else %}
btn-link{% endif %} btn-link{% endif %}
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -127,21 +127,16 @@
<ul> <ul>
<li>"important" = top priority</li> <li>"important" = top priority</li>
<li>"opinion-needed" = medium priority</li> <li>"opinion-needed" = medium priority</li>
<li>"work needed" = low priority</li>
<li>"inactive/postponed" = very low priority</li> <li>"inactive/postponed" = very low priority</li>
</ul> </ul>
<p>PR with 'work needed' have a small malus in priority</p>
<p>PR with 'dying' status have a small bonus in priority</p>
<strong>Then with creation time</strong> <strong>Then with creation time</strong>
<p>older PRs have higher priority than newer PR</p> <p>older PRs have higher priority than newer PR</p>
<strong>'Dying' status</strong> <strong>'Dying' status</strong>
<p>A PR is considered "dying" if it has been created more than 60 <p>A PR is considered "dying" if it has been created more than 60
days ago and not updated since 30 days. This is meant to be an incentive to days ago and not updated since 30 days. This is meant to be an incentive to
either revive it or flag it as inactive/postponed... 'Dying' PRs either revive it or flag it as inactive/postponed... </p>
have a small boost in priority to be listed first</a>
</br>
<p>Repos considered for now (completely arbitrary) : [yunohost, yunohost-admin, SSOwat, moulinette, doc, ynh-dev,
apps, CI_package_check, example_ynh, package_linter, Simone,
project-organization, build.yunohost.org, dynette, YunoPorts,
rebuildd, cd_build, install_script]</p>
</div> </div>
</div> </div>