mr.html 3.91 KB
Newer Older
Laurent Peuch's avatar
Laurent Peuch committed
1
2
3
4
<!doctype html>
<html>
    <head>
        <title>All open MRs</title>
5
        <link href="css/style.css" rel="stylesheet" type="text/css">
Laurent Peuch's avatar
Laurent Peuch committed
6
7
    </head>
    <body>
8
        <h1>MR Center<small>all the Merge Requests that need attention in a single place</small></h1>
Laurent Peuch's avatar
Laurent Peuch committed
9
10

        <h2>CubicWeb Core Projects</h2>
Laurent Peuch's avatar
Laurent Peuch committed
11
        {% for project in projects %}
Laurent Peuch's avatar
Laurent Peuch committed
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
        {% if project["merge_requests"] %}
        <h3>{{ project["project"]["name"] }}</h3>

        <ul>
        {% for mr in project["merge_requests"] %}
        <li>
            {% if mr["pipeline"] %}
            <span class="job job-{{ mr["pipeline"]["status"] }}"> </span>
            {% else %}
            <span class="job job-empty">?</span>
            {% endif %}

            {% if not mr["assignees"] %}
            <span title="no one is assigned">
                ⚠️
            </span>
            {% endif %}

            <a href="{{ mr["web_url"] }}" target="_blank">{{ mr["title"] }}</a>

            by <i>{{ mr["author"]["name"] }}</i>

            {% if mr["assignees"] %}
            (assigned: {% for assigned in mr["assignees"] %}{{ assigned["name"] }}{% endfor %})
            {% endif %}

            {% for label in mr["labels"] %}
            <span class="label" style="color: {{ project["labels"][label]["text_color"] }}; background-color: {{ project["labels"][label]["color"] }}">{{ label }}</span>
            {% endfor %}
        </li>
        {% endfor %}
        </ul>
        {% endif %}
        {% endfor %}

47
48
49
        <hr>

        <h2>Project Cubes</h2>
Laurent Peuch's avatar
Laurent Peuch committed
50
        {% for cube in cubes %}
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
        {% if cube["merge_requests"] and "project-dependency" in cube["cube"]["tag_list"] %}
        <h3>{{ cube["cube"]["name"] }}</h3>

        <ul>
        {% for mr in cube["merge_requests"] %}
        <li>
            {% if mr["pipeline"] %}
            <span class="job job-{{ mr["pipeline"]["status"] }}"></span>
            {% else %}
            <span class="job job-empty">?</span>
            {% endif %}

            {% if not mr["assignees"] %}
            <span title="no one is assigned">
                ⚠️
            </span>
            {% endif %}

            <a href="{{ mr["web_url"] }}">{{ mr["title"] }}</a>

            by <i>{{ mr["author"]["name"] }}</i>

            {% if mr["assignees"] %}
            (assigned: {% for assigned in mr["assignees"] %}{{ assigned["name"] }}{% endfor %})
            {% endif %}

77
            {% for label in mr["labels"] %}
78
79
80
81
82
83
84
85
86
87
88
            <span class="label" style="color: {{ cube["labels"][label]["text_color"] }}; background-color: {{ cube["labels"][label]["color"] }}">{{ label }}</span>
            {% endfor %}
        </li>
        {% endfor %}
        </ul>
        {% endif %}
        {% endfor %}

        <hr>

        <h2>Unused Cubes</h2>
Laurent Peuch's avatar
Laurent Peuch committed
89
        {% for cube in cubes %}
90
        {% if cube["merge_requests"] and "project-dependency" not in cube["cube"]["tag_list"] %}
Laurent Peuch's avatar
Laurent Peuch committed
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
        <h3>{{ cube["cube"]["name"] }}</h3>

        <ul>
        {% for mr in cube["merge_requests"] %}
        <li>
            {% if mr["pipeline"] %}
            <span class="job job-{{ mr["pipeline"]["status"] }}"></span>
            {% else %}
            <span class="job job-empty">?</span>
            {% endif %}

            {% if not mr["assignees"] %}
            <span title="no one is assigned">
                ⚠️
            </span>
            {% endif %}

            <a href="{{ mr["web_url"] }}">{{ mr["title"] }}</a>

            by <i>{{ mr["author"]["name"] }}</i>

            {% if mr["assignees"] %}
            (assigned: {% for assigned in mr["assignees"] %}{{ assigned["name"] }}{% endfor %})
            {% endif %}

116
            {% for label in mr["labels"] %}
Laurent Peuch's avatar
Laurent Peuch committed
117
118
119
120
121
122
123
124
125
            <span class="label" style="color: {{ cube["labels"][label]["text_color"] }}; background-color: {{ cube["labels"][label]["color"] }}">{{ label }}</span>
            {% endfor %}
        </li>
        {% endfor %}
        </ul>
        {% endif %}
        {% endfor %}
    </body>
</html>