pulls.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <style>
  6. * { font-family: sans-serif; }
  7. h1 { font-size: 20px; }
  8. h2 { font-size: 16px; }
  9. p { font-size: 15px; }
  10. li { font-size: 13px; }
  11. table { border-collapse: collapse; }
  12. td, th { border-bottom: 1px solid #ddd; padding: 5px 6px; font-size: 13px; text-align: left; vertical-align: baseline; }
  13. tr:nth-child(even) { background: #eee; }
  14. .dot:before {
  15. content: "";
  16. display: inline-block;
  17. width: 0.4em;
  18. height: 0.4em;
  19. border-radius: 50% 50%;
  20. margin-right: 0.3em;
  21. border: 1px solid transparent;
  22. }
  23. .need-triage-red:before {
  24. background: #FF0000;
  25. border-color: black;
  26. border-radius:2;
  27. }
  28. .need-triage-yellow:before {
  29. background: #FFFF00;
  30. border-color: black;
  31. border-radius:2;
  32. }
  33. .need-triage-green:before {
  34. background: #90EE90;
  35. border-color: black;
  36. border-radius:2;
  37. }
  38. </style>
  39. </head>
  40. <body>
  41. <h1>Toriage - <a href="https://github.com/{{ owner }}/{{ repo }}">{{ owner }}/{{ repo }}</a></h1>
  42. <table>
  43. <thead>
  44. <tr>
  45. <th>#</th>
  46. <th>Need triage</th>
  47. <th>Wait for</th>
  48. <th>Title</th>
  49. <th>Author</th>
  50. <th>Assignee</th>
  51. <th>Labels</th>
  52. <th>Updated at</th>
  53. </tr>
  54. </thead>
  55. <tbody>
  56. {% for pull in pulls %}
  57. <tr>
  58. <td><a href="{{ pull.html_url }}">{{ pull.number }}</a></td>
  59. <td class='dot need-triage-{{ pull.need_triage }}'>{{ pull.days_from_last_updated_at }} {% if pull.days_from_last_updated_at > 1 %}days{% else %}day{% endif %}</td>
  60. <td>{% if pull.wait_for_author %}<b>{{ pull.author }}</b>{% elif pull.wait_for_review %}<b>{{ pull.assignee }}</b>{% endif %}</td>
  61. <td>{{ pull.title }}</td>
  62. <!-- Author or reviewer name become bold because we can faster spot whether `Wait for` is author or reviewer. -->
  63. <td {% if pull.wait_for_author %} style='font-weight: bold;'{% endif %}>{{ pull.author }}</td>
  64. <td {% if pull.wait_for_review %} style='font-weight: bold;'{% endif %}>{{ pull.assignee }}</td>
  65. <td>{{ pull.labels }}</td>
  66. <td>{{ pull.updated_at }}</td>
  67. </tr>
  68. {% endfor %}
  69. </tbody>
  70. </table>
  71. <div>
  72. <p>From the last updated at</p>
  73. <ul>
  74. <li class='dot need-triage-red'>14 days or more</li>
  75. <li class='dot need-triage-yellow'>7 days or more</li>
  76. <li class='dot need-triage-green'>less than 7days</li>
  77. </ul>
  78. </div>
  79. <footer>
  80. <nav>
  81. {% if prev %}
  82. <a href="{{ prev }}">Prev</a>
  83. {% endif %}
  84. {% if next %}
  85. <a href="{{ next }}">Next</a>
  86. {% endif %}
  87. </nav>
  88. </footer>
  89. </body>
  90. </html>