-
Notifications
You must be signed in to change notification settings - Fork 174
/
pr-view-config.yml
289 lines (263 loc) · 13.7 KB
/
pr-view-config.yml
1
2
3
4
5
6
7
8
9
10
11
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
47
48
49
50
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
title: 'Pull requests detailed view'
output:
format: html
filename: 'docs/pr.html'
setup: |
function sleep(milliseconds) {
const date = Date.now();
let currentDate = null;
do {currentDate = Date.now();}
while (currentDate - date < milliseconds);
}
userdata.count = async function(repo,label) {
sleep(1000)
var results;
if(label === "" ) {
results = await github.search.issuesAndPullRequests(
{ q: `repo:${repo} is:pr is:open` }
)
}
else if(label === "closed") {
results = await github.search.issuesAndPullRequests(
{ q: `repo:${repo} is:pr is:closed closed:>${date("-30 days")}`}
)
}
else if(label === "stale") {
results = await github.search.issuesAndPullRequests(
{ q: `repo:${repo} is:pr is:open created:<${date("-30 days")}`}
)
}
else{
results = await github.search.issuesAndPullRequests(
{ q: `repo:${repo} is:pr is:open label:${label}`}
)
}
if(results.data.items.length === 0){
return '0'
}
else{
return results.data.total_count
}
}
userdata.url = async function(repo,label) {
sleep(1000)
var url;
var today = new Date();
var pastDate = new Date(today);
if(label === "") {
url = 'https://github.com/'+repo+'/pulls?q=is%3Apr+is%3A'+ 'open'
}
else if(label === "closed") {
pastDate.setDate(pastDate.getDate() - 30);
var closedDate = pastDate.toISOString().split("T")[0];
url = 'https://github.com/' + repo + '/pulls?q=is%3Aissue+is%3A' + 'closed' + '+closed%3A>'+ closedDate
}
else if(label === "stale") {
pastDate.setDate(pastDate.getDate() - 30);
var staledate = pastDate.toISOString().split("T")[0];
url = 'https://github.com/' + repo + '/pulls?q=is%3Apr+is%3A' + 'open' + '+created%3A<'+staledate
}
else{
url = 'https://github.com/'+repo+'/pulls?q=is%3Apr+is%3A'+'open'+'+label%3A'+label
}
return url
}
sections:
- title: ''
widgets:
- type: 'table'
headers:
- 'Action'
- 'Open'
- 'Stale(30_days old)'
- 'Closed(last_30 days)'
elements:
- - value: 'azure login'
- value: '{{ userdata.count("Azure/login","") }}'
url: '{{ userdata.url("Azure/login","") }}'
- value: '{{ userdata.count("Azure/login","stale") }}'
url: '{{ userdata.url("Azure/login","stale") }}'
- value: '{{ userdata.count("Azure/login","closed") }}'
url: '{{ userdata.url("Azure/login","closed") }}'
- - value: 'webapps-deploy'
- value: '{{ userdata.count("Azure/webapps-deploy","") }}'
url: '{{ userdata.url("Azure/webapps-deploy","") }}'
- value: '{{ userdata.count("Azure/webapps-deploy","stale") }}'
url: '{{ userdata.url("Azure/webapps-deploy","stale") }}'
- value: '{{ userdata.count("Azure/webapps-deploy","closed") }}'
url: '{{ userdata.url("Azure/webapps-deploy","closed") }}'
- - value: 'aci-deploy'
- value: '{{ userdata.count("Azure/aci-deploy","") }}'
url: '{{ userdata.url("Azure/aci-deploy","") }}'
- value: '{{ userdata.count("Azure/aci-deploy","stale") }}'
url: '{{ userdata.url("Azure/aci-deploy","stale") }}'
- value: '{{ userdata.count("Azure/aci-deploy","closed") }}'
url: '{{ userdata.url("Azure/aci-deploy","closed") }}'
- - value: 'build-vm-image'
- value: '{{ userdata.count("Azure/build-vm-image","") }}'
url: '{{ userdata.url("Azure/build-vm-image","") }}'
- value: '{{ userdata.count("Azure/build-vm-image","stale") }}'
url: '{{ userdata.url("Azure/build-vm-image","stale") }}'
- value: '{{ userdata.count("Azure/build-vm-image","closed") }}'
url: '{{ userdata.url("Azure/build-vm-image","closed") }}'
- - value: 'functions-action'
- value: '{{ userdata.count("Azure/functions-action","") }}'
url: '{{ userdata.url("Azure/functions-action","") }}'
- value: '{{ userdata.count("Azure/functions-action","stale") }}'
url: '{{ userdata.url("Azure/functions-action","stale") }}'
- value: '{{ userdata.count("Azure/functions-action","closed") }}'
url: '{{ userdata.url("Azure/functions-action","closed") }}'
- - value: 'functions-container-action'
- value: '{{ userdata.count("Azure/functions-container-action","") }}'
url: '{{ userdata.url("Azure/functions-container-action","") }}'
- value: '{{ userdata.count("Azure/functions-container-action","stale") }}'
url: '{{ userdata.url("Azure/functions-container-action","stale") }}'
- value: '{{ userdata.count("Azure/functions-container-action","closed") }}'
url: '{{ userdata.url("Azure/functions-container-action","closed") }}'
- - value: 'mysql'
- value: '{{ userdata.count("Azure/mysql","") }}'
url: '{{ userdata.url("Azure/mysql","") }}'
- value: '{{ userdata.count("Azure/mysql","stale") }}'
url: '{{ userdata.url("Azure/mysql","stale") }}'
- value: '{{ userdata.count("Azure/mysql","closed") }}'
url: '{{ userdata.url("Azure/mysql","closed") }}'
- - value: 'postgresql'
- value: '{{ userdata.count("Azure/postgresql","") }}'
url: '{{ userdata.url("Azure/postgresql","") }}'
- value: '{{ userdata.count("Azure/postgresql","stale") }}'
url: '{{ userdata.url("Azure/postgresql","stale") }}'
- value: '{{ userdata.count("Azure/postgresql","closed") }}'
url: '{{ userdata.url("Azure/postgresql","closed") }}'
- - value: 'powershell'
- value: '{{ userdata.count("Azure/powershell","") }}'
url: '{{ userdata.url("Azure/powershell","") }}'
- value: '{{ userdata.count("Azure/powershell","stale") }}'
url: '{{ userdata.url("Azure/powershell","stale") }}'
- value: '{{ userdata.count("Azure/powershell","closed") }}'
url: '{{ userdata.url("Azure/powershell","closed") }}'
- - value: 'sql-action'
- value: '{{ userdata.count("Azure/sql-action","") }}'
url: '{{ userdata.url("Azure/sql-action","") }}'
- value: '{{ userdata.count("Azure/sql-action","stale") }}'
url: '{{ userdata.url("Azure/sql-action","stale") }}'
- value: '{{ userdata.count("Azure/sql-action","closed") }}'
url: '{{ userdata.url("Azure/sql-action","closed") }}'
- - value: 'policy-compliance-scan'
- value: '{{ userdata.count("Azure/policy-compliance-scan","") }}'
url: '{{ userdata.url("Azure/policy-compliance-scan","") }}'
- value: '{{ userdata.count("Azure/policy-compliance-scan","stale") }}'
url: '{{ userdata.url("Azure/policy-compliance-scan","stale") }}'
- value: '{{ userdata.count("Azure/policy-compliance-scan","closed") }}'
url: '{{ userdata.url("Azure/policy-compliance-scan","closed") }}'
- - value: 'k8s-create-secret'
- value: '{{ userdata.count("Azure/k8s-create-secret","") }}'
url: '{{ userdata.url("Azure/k8s-create-secret","") }}'
- value: '{{ userdata.count("Azure/k8s-create-secret","stale") }}'
url: '{{ userdata.url("Azure/k8s-create-secret","stale") }}'
- value: '{{ userdata.count("Azure/k8s-create-secret","closed") }}'
url: '{{ userdata.url("Azure/k8s-create-secret","closed") }}'
- - value: 'k8s-deploy'
- value: '{{ userdata.count("Azure/k8s-deploy","") }}'
url: '{{ userdata.url("Azure/k8s-deploy","") }}'
- value: '{{ userdata.count("Azure/k8s-deploy","stale") }}'
url: '{{ userdata.url("Azure/k8s-deploy","stale") }}'
- value: '{{ userdata.count("Azure/k8s-deploy","closed") }}'
url: '{{ userdata.url("Azure/k8s-deploy","closed") }}'
- - value: 'k8s-lint'
- value: '{{ userdata.count("Azure/k8s-lint","") }}'
url: '{{ userdata.url("Azure/k8s-lint","") }}'
- value: '{{ userdata.count("Azure/k8s-lint","stale") }}'
url: '{{ userdata.url("Azure/k8s-lint","stale") }}'
- value: '{{ userdata.count("Azure/k8s-lint","closed") }}'
url: '{{ userdata.url("Azure/k8s-lint","closed") }}'
- - value: 'appservice-settings'
- value: '{{ userdata.count("Azure/appservice-settings","") }}'
url: '{{ userdata.url("Azure/appservice-settings","") }}'
- value: '{{ userdata.count("Azure/appservice-settings","stale") }}'
url: '{{ userdata.url("Azure/appservice-settings","stale") }}'
- value: '{{ userdata.count("Azure/appservice-settings","closed") }}'
url: '{{ userdata.url("Azure/appservice-settings","closed") }}'
- - value: 'manage-azure-policy'
- value: '{{ userdata.count("Azure/manage-azure-policy","") }}'
url: '{{ userdata.url("Azure/manage-azure-policy","") }}'
- value: '{{ userdata.count("Azure/manage-azure-policy","stale") }}'
url: '{{ userdata.url("Azure/manage-azure-policy","stale") }}'
- value: '{{ userdata.count("Azure/manage-azure-policy","closed") }}'
url: '{{ userdata.url("Azure/manage-azure-policy","closed") }}'
- - value: 'setup-kubectl'
- value: '{{ userdata.count("Azure/setup-kubectl","") }}'
url: '{{ userdata.url("Azure/setup-kubectl","") }}'
- value: '{{ userdata.count("Azure/setup-kubectl","stale") }}'
url: '{{ userdata.url("Azure/setup-kubectl","stale") }}'
- value: '{{ userdata.count("Azure/setup-kubectl","closed") }}'
url: '{{ userdata.url("Azure/setup-kubectl","closed") }}'
- - value: 'aks-set-context'
- value: '{{ userdata.count("Azure/aks-set-context","") }}'
url: '{{ userdata.url("Azure/aks-set-context","") }}'
- value: '{{ userdata.count("Azure/aks-set-context","stale") }}'
url: '{{ userdata.url("Azure/aks-set-context","stale") }}'
- value: '{{ userdata.count("Azure/aks-set-context","closed") }}'
url: '{{ userdata.url("Azure/aks-set-context","closed") }}'
- - value: 'k8s-bake'
- value: '{{ userdata.count("Azure/k8s-bake","") }}'
url: '{{ userdata.url("Azure/k8s-bake","") }}'
- value: '{{ userdata.count("Azure/k8s-bake","stale") }}'
url: '{{ userdata.url("Azure/k8s-bake","stale") }}'
- value: '{{ userdata.count("Azure/k8s-bake","closed") }}'
url: '{{ userdata.url("Azure/k8s-bake","closed") }}'
- - value: 'static-web-apps-deploy'
- value: '{{ userdata.count("Azure/static-web-apps-deploy","") }}'
url: '{{ userdata.url("Azure/static-web-apps-deploy","") }}'
- value: '{{ userdata.count("Azure/static-web-apps-deploy","stale") }}'
url: '{{ userdata.url("Azure/static-web-apps-deploy","stale") }}'
- value: '{{ userdata.count("Azure/static-web-apps-deploy","closed") }}'
url: '{{ userdata.url("Azure/static-web-apps-deploy","closed") }}'
- - value: 'AppConfiguration-Sync'
- value: '{{ userdata.count("Azure/AppConfiguration-Sync","") }}'
url: '{{ userdata.url("Azure/AppConfiguration-Sync","") }}'
- value: '{{ userdata.count("Azure/AppConfiguration-Sync","stale") }}'
url: '{{ userdata.url("Azure/AppConfiguration-Sync","stale") }}'
- value: '{{ userdata.count("Azure/AppConfiguration-Sync","closed") }}'
url: '{{ userdata.url("Azure/AppConfiguration-Sync","closed") }}'
- - value: 'k8s-set-context'
- value: '{{ userdata.count("Azure/k8s-set-context","") }}'
url: '{{ userdata.url("Azure/k8s-set-context","") }}'
- value: '{{ userdata.count("Azure/k8s-set-context","stale") }}'
url: '{{ userdata.url("Azure/k8s-set-context","stale") }}'
- value: '{{ userdata.count("Azure/k8s-set-context","closed") }}'
url: '{{ userdata.url("Azure/k8s-set-context","closed") }}'
- - value: 'setup-helm'
- value: '{{ userdata.count("Azure/setup-helm","") }}'
url: '{{ userdata.url("Azure/setup-helm","") }}'
- value: '{{ userdata.count("Azure/setup-helm","stale") }}'
url: '{{ userdata.url("Azure/setup-helm","stale") }}'
- value: '{{ userdata.count("Azure/setup-helm","closed") }}'
url: '{{ userdata.url("Azure/setup-helm","closed") }}'
- - value: 'docker-login'
- value: '{{ userdata.count("Azure/docker-login","") }}'
url: '{{ userdata.url("Azure/docker-login","") }}'
- value: '{{ userdata.count("Azure/docker-login","stale") }}'
url: '{{ userdata.url("Azure/docker-login","stale") }}'
- value: '{{ userdata.count("Azure/docker-login","closed") }}'
url: '{{ userdata.url("Azure/docker-login","closed") }}'
- - value: 'arm-deploy'
- value: '{{ userdata.count("Azure/arm-deploy","") }}'
url: '{{ userdata.url("Azure/arm-deploy","") }}'
- value: '{{ userdata.count("Azure/arm-deploy","stale") }}'
url: '{{ userdata.url("Azure/arm-deploy","stale") }}'
- value: '{{ userdata.count("Azure/arm-deploy","closed") }}'
url: '{{ userdata.url("Azure/arm-deploy","closed") }}'
- - value: 'Azure/cli'
- value: '{{ userdata.count("Azure/cli","") }}'
url: '{{ userdata.url("Azure/cli","") }}'
- value: '{{ userdata.count("Azure/cli","stale") }}'
url: '{{ userdata.url("Azure/cli","stale") }}'
- value: '{{ userdata.count("Azure/cli","closed") }}'
url: '{{ userdata.url("Azure/cli","closed") }}'
- - value: 'Azure/load-testing'
- value: '{{ userdata.count("Azure/load-testing","") }}'
url: '{{ userdata.url("Azure/load-testing","") }}'
- value: '{{ userdata.count("Azure/load-testing","stale") }}'
url: '{{ userdata.url("Azure/load-testing","stale") }}'
- value: '{{ userdata.count("Azure/load-testing","closed") }}'
url: '{{ userdata.url("Azure/load-testing","closed") }}'