@backstage-community/plugin-cicd-statistics-module-gitlab 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,920 @@
1
+ # @backstage-community/plugin-cicd-statistics-module-gitlab
2
+
3
+ ## 0.1.31
4
+
5
+ ### Patch Changes
6
+
7
+ - 193a2a3: Migrated from the [backstage/backstage](https://github.com/backstage/backstage) monorepo.
8
+ - Updated dependencies [193a2a3]
9
+ - @backstage-community/plugin-cicd-statistics@0.1.37
10
+
11
+ ## 0.1.30
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+ - @backstage-community/plugin-cicd-statistics@0.1.36
17
+ - @backstage/core-plugin-api@1.9.2
18
+ - @backstage/catalog-model@1.4.5
19
+
20
+ ## 0.1.30-next.1
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+ - @backstage/catalog-model@1.4.5
26
+ - @backstage/core-plugin-api@1.9.1
27
+ - @backstage-community/plugin-cicd-statistics@0.1.36-next.1
28
+
29
+ ## 0.1.30-next.0
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies
34
+ - @backstage/catalog-model@1.4.5
35
+ - @backstage/core-plugin-api@1.9.1
36
+ - @backstage-community/plugin-cicd-statistics@0.1.36-next.0
37
+
38
+ ## 0.1.29
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies
43
+ - @backstage-community/plugin-cicd-statistics@0.1.35
44
+ - @backstage/core-plugin-api@1.9.1
45
+ - @backstage/catalog-model@1.4.5
46
+
47
+ ## 0.1.28
48
+
49
+ ### Patch Changes
50
+
51
+ - Updated dependencies
52
+ - @backstage-community/plugin-cicd-statistics@0.1.34
53
+ - @backstage/core-plugin-api@1.9.1
54
+ - @backstage/catalog-model@1.4.5
55
+
56
+ ## 0.1.27
57
+
58
+ ### Patch Changes
59
+
60
+ - 402d991: Align `p-limit` dependency version to v3
61
+ - Updated dependencies
62
+ - @backstage/catalog-model@1.4.5
63
+ - @backstage/core-plugin-api@1.9.1
64
+ - @backstage-community/plugin-cicd-statistics@0.1.33
65
+
66
+ ## 0.1.27-next.2
67
+
68
+ ### Patch Changes
69
+
70
+ - Updated dependencies
71
+ - @backstage-community/plugin-cicd-statistics@0.1.33-next.2
72
+ - @backstage/catalog-model@1.4.5-next.0
73
+ - @backstage/core-plugin-api@1.9.1-next.1
74
+
75
+ ## 0.1.27-next.1
76
+
77
+ ### Patch Changes
78
+
79
+ - Updated dependencies
80
+ - @backstage/core-plugin-api@1.9.1-next.1
81
+ - @backstage/catalog-model@1.4.5-next.0
82
+ - @backstage-community/plugin-cicd-statistics@0.1.33-next.1
83
+
84
+ ## 0.1.27-next.0
85
+
86
+ ### Patch Changes
87
+
88
+ - 402d991: Align `p-limit` dependency version to v3
89
+ - Updated dependencies
90
+ - @backstage/catalog-model@1.4.5-next.0
91
+ - @backstage/core-plugin-api@1.9.1-next.0
92
+ - @backstage-community/plugin-cicd-statistics@0.1.33-next.0
93
+
94
+ ## 0.1.26
95
+
96
+ ### Patch Changes
97
+
98
+ - Updated dependencies
99
+ - @backstage/catalog-model@1.4.4
100
+ - @backstage/core-plugin-api@1.9.0
101
+ - @backstage-community/plugin-cicd-statistics@0.1.32
102
+
103
+ ## 0.1.26-next.3
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies
108
+ - @backstage/catalog-model@1.4.4-next.0
109
+ - @backstage/core-plugin-api@1.9.0-next.1
110
+ - @backstage-community/plugin-cicd-statistics@0.1.32-next.3
111
+
112
+ ## 0.1.26-next.2
113
+
114
+ ### Patch Changes
115
+
116
+ - Updated dependencies
117
+ - @backstage/core-plugin-api@1.9.0-next.1
118
+ - @backstage-community/plugin-cicd-statistics@0.1.32-next.2
119
+ - @backstage/catalog-model@1.4.4-next.0
120
+
121
+ ## 0.1.26-next.1
122
+
123
+ ### Patch Changes
124
+
125
+ - Updated dependencies
126
+ - @backstage/catalog-model@1.4.4-next.0
127
+ - @backstage/core-plugin-api@1.8.3-next.0
128
+ - @backstage-community/plugin-cicd-statistics@0.1.32-next.1
129
+
130
+ ## 0.1.26-next.0
131
+
132
+ ### Patch Changes
133
+
134
+ - Updated dependencies
135
+ - @backstage-community/plugin-cicd-statistics@0.1.32-next.0
136
+ - @backstage/catalog-model@1.4.3
137
+ - @backstage/core-plugin-api@1.8.2
138
+
139
+ ## 0.1.25
140
+
141
+ ### Patch Changes
142
+
143
+ - Updated dependencies
144
+ - @backstage/core-plugin-api@1.8.2
145
+ - @backstage/catalog-model@1.4.3
146
+ - @backstage-community/plugin-cicd-statistics@0.1.31
147
+
148
+ ## 0.1.25-next.2
149
+
150
+ ### Patch Changes
151
+
152
+ - Updated dependencies
153
+ - @backstage-community/plugin-cicd-statistics@0.1.31-next.2
154
+
155
+ ## 0.1.25-next.1
156
+
157
+ ### Patch Changes
158
+
159
+ - Updated dependencies
160
+ - @backstage/core-plugin-api@1.8.2-next.0
161
+ - @backstage-community/plugin-cicd-statistics@0.1.31-next.1
162
+ - @backstage/catalog-model@1.4.3
163
+
164
+ ## 0.1.25-next.0
165
+
166
+ ### Patch Changes
167
+
168
+ - Updated dependencies
169
+ - @backstage/catalog-model@1.4.3
170
+ - @backstage/core-plugin-api@1.8.1
171
+ - @backstage-community/plugin-cicd-statistics@0.1.31-next.0
172
+
173
+ ## 0.1.24
174
+
175
+ ### Patch Changes
176
+
177
+ - Updated dependencies
178
+ - @backstage/core-plugin-api@1.8.1
179
+ - @backstage-community/plugin-cicd-statistics@0.1.30
180
+ - @backstage/catalog-model@1.4.3
181
+
182
+ ## 0.1.24-next.3
183
+
184
+ ### Patch Changes
185
+
186
+ - Updated dependencies
187
+ - @backstage/catalog-model@1.4.3
188
+ - @backstage/core-plugin-api@1.8.1-next.1
189
+ - @backstage-community/plugin-cicd-statistics@0.1.30-next.3
190
+
191
+ ## 0.1.24-next.2
192
+
193
+ ### Patch Changes
194
+
195
+ - Updated dependencies
196
+ - @backstage/catalog-model@1.4.3
197
+ - @backstage/core-plugin-api@1.8.1-next.1
198
+ - @backstage-community/plugin-cicd-statistics@0.1.30-next.2
199
+
200
+ ## 0.1.24-next.1
201
+
202
+ ### Patch Changes
203
+
204
+ - Updated dependencies
205
+ - @backstage/core-plugin-api@1.8.1-next.1
206
+ - @backstage-community/plugin-cicd-statistics@0.1.30-next.1
207
+ - @backstage/catalog-model@1.4.3
208
+
209
+ ## 0.1.24-next.0
210
+
211
+ ### Patch Changes
212
+
213
+ - Updated dependencies
214
+ - @backstage/core-plugin-api@1.8.1-next.0
215
+ - @backstage-community/plugin-cicd-statistics@0.1.30-next.0
216
+ - @backstage/catalog-model@1.4.3
217
+
218
+ ## 0.1.22
219
+
220
+ ### Patch Changes
221
+
222
+ - 6c2b872153: Add official support for React 18.
223
+ - Updated dependencies
224
+ - @backstage/core-plugin-api@1.8.0
225
+ - @backstage-community/plugin-cicd-statistics@0.1.28
226
+ - @backstage/catalog-model@1.4.3
227
+
228
+ ## 0.1.22-next.2
229
+
230
+ ### Patch Changes
231
+
232
+ - Updated dependencies
233
+ - @backstage-community/plugin-cicd-statistics@0.1.28-next.2
234
+
235
+ ## 0.1.22-next.1
236
+
237
+ ### Patch Changes
238
+
239
+ - Updated dependencies
240
+ - @backstage-community/plugin-cicd-statistics@0.1.28-next.1
241
+ - @backstage/catalog-model@1.4.3
242
+ - @backstage/core-plugin-api@1.8.0-next.0
243
+
244
+ ## 0.1.22-next.0
245
+
246
+ ### Patch Changes
247
+
248
+ - 6c2b872153: Add official support for React 18.
249
+ - Updated dependencies
250
+ - @backstage/core-plugin-api@1.8.0-next.0
251
+ - @backstage-community/plugin-cicd-statistics@0.1.28-next.0
252
+ - @backstage/catalog-model@1.4.3
253
+
254
+ ## 0.1.21
255
+
256
+ ### Patch Changes
257
+
258
+ - Updated dependencies
259
+ - @backstage/core-plugin-api@1.7.0
260
+ - @backstage-community/plugin-cicd-statistics@0.1.27
261
+ - @backstage/catalog-model@1.4.3
262
+
263
+ ## 0.1.21-next.2
264
+
265
+ ### Patch Changes
266
+
267
+ - Updated dependencies
268
+ - @backstage/core-plugin-api@1.7.0-next.1
269
+ - @backstage-community/plugin-cicd-statistics@0.1.27-next.2
270
+ - @backstage/catalog-model@1.4.3-next.0
271
+
272
+ ## 0.1.21-next.1
273
+
274
+ ### Patch Changes
275
+
276
+ - Updated dependencies
277
+ - @backstage/core-plugin-api@1.7.0-next.0
278
+ - @backstage/catalog-model@1.4.2
279
+ - @backstage-community/plugin-cicd-statistics@0.1.27-next.1
280
+
281
+ ## 0.1.21-next.0
282
+
283
+ ### Patch Changes
284
+
285
+ - Updated dependencies
286
+ - @backstage/core-plugin-api@1.7.0-next.0
287
+ - @backstage-community/plugin-cicd-statistics@0.1.27-next.0
288
+ - @backstage/catalog-model@1.4.2
289
+
290
+ ## 0.1.20
291
+
292
+ ### Patch Changes
293
+
294
+ - 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds.
295
+ - Updated dependencies
296
+ - @backstage/catalog-model@1.4.2
297
+ - @backstage/core-plugin-api@1.6.0
298
+ - @backstage-community/plugin-cicd-statistics@0.1.26
299
+
300
+ ## 0.1.20-next.3
301
+
302
+ ### Patch Changes
303
+
304
+ - 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds.
305
+ - Updated dependencies
306
+ - @backstage/catalog-model@1.4.2-next.2
307
+ - @backstage/core-plugin-api@1.6.0-next.3
308
+ - @backstage-community/plugin-cicd-statistics@0.1.26-next.3
309
+
310
+ ## 0.1.20-next.2
311
+
312
+ ### Patch Changes
313
+
314
+ - Updated dependencies
315
+ - @backstage/core-plugin-api@1.6.0-next.2
316
+ - @backstage-community/plugin-cicd-statistics@0.1.26-next.2
317
+ - @backstage/catalog-model@1.4.2-next.1
318
+
319
+ ## 0.1.20-next.1
320
+
321
+ ### Patch Changes
322
+
323
+ - Updated dependencies
324
+ - @backstage-community/plugin-cicd-statistics@0.1.26-next.1
325
+ - @backstage/catalog-model@1.4.2-next.0
326
+ - @backstage/core-plugin-api@1.6.0-next.1
327
+
328
+ ## 0.1.19-next.0
329
+
330
+ ### Patch Changes
331
+
332
+ - Updated dependencies
333
+ - @backstage/core-plugin-api@1.6.0-next.0
334
+ - @backstage/catalog-model@1.4.1
335
+ - @backstage-community/plugin-cicd-statistics@0.1.25-next.0
336
+
337
+ ## 0.1.17
338
+
339
+ ### Patch Changes
340
+
341
+ - 12a8c94eda8d: Add package repository and homepage metadata
342
+ - Updated dependencies
343
+ - @backstage/core-plugin-api@1.5.3
344
+ - @backstage/catalog-model@1.4.1
345
+ - @backstage-community/plugin-cicd-statistics@0.1.23
346
+
347
+ ## 0.1.17-next.2
348
+
349
+ ### Patch Changes
350
+
351
+ - Updated dependencies
352
+ - @backstage-community/plugin-cicd-statistics@0.1.23-next.1
353
+
354
+ ## 0.1.17-next.1
355
+
356
+ ### Patch Changes
357
+
358
+ - 12a8c94eda8d: Add package repository and homepage metadata
359
+ - Updated dependencies
360
+ - @backstage/catalog-model@1.4.1
361
+ - @backstage/core-plugin-api@1.5.3
362
+ - @backstage-community/plugin-cicd-statistics@0.1.23-next.0
363
+
364
+ ## 0.1.17-next.0
365
+
366
+ ### Patch Changes
367
+
368
+ - Updated dependencies
369
+ - @backstage/core-plugin-api@1.5.3
370
+ - @backstage/catalog-model@1.4.1
371
+ - @backstage-community/plugin-cicd-statistics@0.1.23-next.0
372
+
373
+ ## 0.1.16
374
+
375
+ ### Patch Changes
376
+
377
+ - Updated dependencies
378
+ - @backstage/core-plugin-api@1.5.3
379
+ - @backstage/catalog-model@1.4.1
380
+ - @backstage-community/plugin-cicd-statistics@0.1.22
381
+
382
+ ## 0.1.16-next.2
383
+
384
+ ### Patch Changes
385
+
386
+ - Updated dependencies
387
+ - @backstage/core-plugin-api@1.5.3-next.1
388
+ - @backstage/catalog-model@1.4.1-next.0
389
+ - @backstage-community/plugin-cicd-statistics@0.1.22-next.2
390
+
391
+ ## 0.1.16-next.1
392
+
393
+ ### Patch Changes
394
+
395
+ - Updated dependencies
396
+ - @backstage/core-plugin-api@1.5.3-next.0
397
+ - @backstage-community/plugin-cicd-statistics@0.1.22-next.1
398
+
399
+ ## 0.1.16-next.0
400
+
401
+ ### Patch Changes
402
+
403
+ - Updated dependencies
404
+ - @backstage/catalog-model@1.4.1-next.0
405
+ - @backstage/core-plugin-api@1.5.2
406
+ - @backstage-community/plugin-cicd-statistics@0.1.22-next.0
407
+
408
+ ## 0.1.15
409
+
410
+ ### Patch Changes
411
+
412
+ - 50c4457119ec: Fixed publish configuration.
413
+ - Updated dependencies
414
+ - @backstage/core-plugin-api@1.5.2
415
+ - @backstage/catalog-model@1.4.0
416
+ - @backstage-community/plugin-cicd-statistics@0.1.21
417
+
418
+ ## 0.1.15-next.3
419
+
420
+ ### Patch Changes
421
+
422
+ - Updated dependencies
423
+ - @backstage/catalog-model@1.4.0-next.1
424
+ - @backstage/core-plugin-api@1.5.2-next.0
425
+ - @backstage-community/plugin-cicd-statistics@0.1.21-next.3
426
+
427
+ ## 0.1.15-next.2
428
+
429
+ ### Patch Changes
430
+
431
+ - Updated dependencies
432
+ - @backstage-community/plugin-cicd-statistics@0.1.21-next.2
433
+ - @backstage/core-plugin-api@1.5.2-next.0
434
+
435
+ ## 0.1.15-next.1
436
+
437
+ ### Patch Changes
438
+
439
+ - 50c4457119ec: Fixed publish configuration.
440
+ - Updated dependencies
441
+ - @backstage/catalog-model@1.4.0-next.0
442
+ - @backstage/core-plugin-api@1.5.2-next.0
443
+ - @backstage-community/plugin-cicd-statistics@0.1.21-next.1
444
+
445
+ ## 0.1.15-next.0
446
+
447
+ ### Patch Changes
448
+
449
+ - Updated dependencies
450
+ - @backstage-community/plugin-cicd-statistics@0.1.21-next.0
451
+ - @backstage/core-plugin-api@1.5.1
452
+ - @backstage/catalog-model@1.3.0
453
+
454
+ ## 0.1.14
455
+
456
+ ### Patch Changes
457
+
458
+ - Updated dependencies
459
+ - @backstage/catalog-model@1.3.0
460
+ - @backstage/core-plugin-api@1.5.1
461
+ - @backstage-community/plugin-cicd-statistics@0.1.20
462
+
463
+ ## 0.1.14-next.2
464
+
465
+ ### Patch Changes
466
+
467
+ - Updated dependencies
468
+ - @backstage/core-plugin-api@1.5.1
469
+ - @backstage-community/plugin-cicd-statistics@0.1.20-next.2
470
+
471
+ ## 0.1.14-next.1
472
+
473
+ ### Patch Changes
474
+
475
+ - Updated dependencies
476
+ - @backstage/core-plugin-api@1.5.1
477
+ - @backstage-community/plugin-cicd-statistics@0.1.20-next.1
478
+
479
+ ## 0.1.14-next.0
480
+
481
+ ### Patch Changes
482
+
483
+ - Updated dependencies
484
+ - @backstage-community/plugin-cicd-statistics@0.1.20-next.0
485
+ - @backstage/core-plugin-api@1.5.1
486
+ - @backstage/catalog-model@1.3.0
487
+
488
+ ## 0.1.13
489
+
490
+ ### Patch Changes
491
+
492
+ - e0c6e8b9c3c: Update peer dependencies
493
+ - Updated dependencies
494
+ - @backstage-community/plugin-cicd-statistics@0.1.19
495
+ - @backstage/core-plugin-api@1.5.1
496
+ - @backstage/catalog-model@1.3.0
497
+
498
+ ## 0.1.13-next.3
499
+
500
+ ### Patch Changes
501
+
502
+ - Updated dependencies
503
+ - @backstage/catalog-model@1.3.0-next.0
504
+ - @backstage/core-plugin-api@1.5.1-next.1
505
+ - @backstage-community/plugin-cicd-statistics@0.1.19-next.3
506
+
507
+ ## 0.1.13-next.2
508
+
509
+ ### Patch Changes
510
+
511
+ - Updated dependencies
512
+ - @backstage-community/plugin-cicd-statistics@0.1.19-next.2
513
+ - @backstage/core-plugin-api@1.5.1-next.1
514
+ - @backstage/catalog-model@1.2.1
515
+
516
+ ## 0.1.13-next.1
517
+
518
+ ### Patch Changes
519
+
520
+ - e0c6e8b9c3c: Update peer dependencies
521
+ - Updated dependencies
522
+ - @backstage/core-plugin-api@1.5.1-next.0
523
+ - @backstage-community/plugin-cicd-statistics@0.1.19-next.1
524
+ - @backstage/catalog-model@1.2.1
525
+
526
+ ## 0.1.13-next.0
527
+
528
+ ### Patch Changes
529
+
530
+ - Updated dependencies
531
+ - @backstage-community/plugin-cicd-statistics@0.1.19-next.0
532
+ - @backstage/core-plugin-api@1.5.0
533
+ - @backstage/catalog-model@1.2.1
534
+
535
+ ## 0.1.12
536
+
537
+ ### Patch Changes
538
+
539
+ - Updated dependencies
540
+ - @backstage/core-plugin-api@1.5.0
541
+ - @backstage/catalog-model@1.2.1
542
+ - @backstage-community/plugin-cicd-statistics@0.1.18
543
+
544
+ ## 0.1.12-next.2
545
+
546
+ ### Patch Changes
547
+
548
+ - Updated dependencies
549
+ - @backstage/core-plugin-api@1.5.0-next.2
550
+ - @backstage-community/plugin-cicd-statistics@0.1.18-next.2
551
+
552
+ ## 0.1.12-next.1
553
+
554
+ ### Patch Changes
555
+
556
+ - Updated dependencies
557
+ - @backstage/core-plugin-api@1.4.1-next.1
558
+ - @backstage/catalog-model@1.2.1-next.1
559
+ - @backstage-community/plugin-cicd-statistics@0.1.18-next.1
560
+
561
+ ## 0.1.12-next.0
562
+
563
+ ### Patch Changes
564
+
565
+ - Updated dependencies
566
+ - @backstage/core-plugin-api@1.4.1-next.0
567
+ - @backstage/catalog-model@1.2.1-next.0
568
+ - @backstage-community/plugin-cicd-statistics@0.1.18-next.0
569
+
570
+ ## 0.1.11
571
+
572
+ ### Patch Changes
573
+
574
+ - Updated dependencies
575
+ - @backstage-community/plugin-cicd-statistics@0.1.17
576
+ - @backstage/catalog-model@1.2.0
577
+ - @backstage/core-plugin-api@1.4.0
578
+
579
+ ## 0.1.11-next.2
580
+
581
+ ### Patch Changes
582
+
583
+ - Updated dependencies
584
+ - @backstage/catalog-model@1.2.0-next.1
585
+ - @backstage/core-plugin-api@1.3.0
586
+ - @backstage-community/plugin-cicd-statistics@0.1.17-next.2
587
+
588
+ ## 0.1.11-next.1
589
+
590
+ ### Patch Changes
591
+
592
+ - Updated dependencies
593
+ - @backstage-community/plugin-cicd-statistics@0.1.17-next.1
594
+ - @backstage/catalog-model@1.1.6-next.0
595
+ - @backstage/core-plugin-api@1.3.0
596
+
597
+ ## 0.1.11-next.0
598
+
599
+ ### Patch Changes
600
+
601
+ - Updated dependencies
602
+ - @backstage/catalog-model@1.1.6-next.0
603
+ - @backstage-community/plugin-cicd-statistics@0.1.17-next.0
604
+
605
+ ## 0.1.10
606
+
607
+ ### Patch Changes
608
+
609
+ - Updated dependencies
610
+ - @backstage/catalog-model@1.1.5
611
+ - @backstage/core-plugin-api@1.3.0
612
+ - @backstage-community/plugin-cicd-statistics@0.1.16
613
+
614
+ ## 0.1.10-next.2
615
+
616
+ ### Patch Changes
617
+
618
+ - Updated dependencies
619
+ - @backstage/core-plugin-api@1.3.0-next.1
620
+ - @backstage/catalog-model@1.1.5-next.1
621
+ - @backstage-community/plugin-cicd-statistics@0.1.16-next.2
622
+
623
+ ## 0.1.10-next.1
624
+
625
+ ### Patch Changes
626
+
627
+ - Updated dependencies
628
+ - @backstage/catalog-model@1.1.5-next.1
629
+ - @backstage/core-plugin-api@1.2.1-next.0
630
+ - @backstage-community/plugin-cicd-statistics@0.1.16-next.1
631
+
632
+ ## 0.1.10-next.0
633
+
634
+ ### Patch Changes
635
+
636
+ - Updated dependencies
637
+ - @backstage/catalog-model@1.1.5-next.0
638
+ - @backstage/core-plugin-api@1.2.0
639
+ - @backstage-community/plugin-cicd-statistics@0.1.16-next.0
640
+
641
+ ## 0.1.9
642
+
643
+ ### Patch Changes
644
+
645
+ - Updated dependencies
646
+ - @backstage-community/plugin-cicd-statistics@0.1.15
647
+
648
+ ## 0.1.8
649
+
650
+ ### Patch Changes
651
+
652
+ - Updated dependencies
653
+ - @backstage/core-plugin-api@1.2.0
654
+ - @backstage-community/plugin-cicd-statistics@0.1.14
655
+ - @backstage/catalog-model@1.1.4
656
+
657
+ ## 0.1.8-next.4
658
+
659
+ ### Patch Changes
660
+
661
+ - Updated dependencies
662
+ - @backstage/catalog-model@1.1.4-next.1
663
+ - @backstage/core-plugin-api@1.2.0-next.2
664
+ - @backstage-community/plugin-cicd-statistics@0.1.14-next.4
665
+
666
+ ## 0.1.8-next.3
667
+
668
+ ### Patch Changes
669
+
670
+ - Updated dependencies
671
+ - @backstage/catalog-model@1.1.4-next.1
672
+ - @backstage/core-plugin-api@1.2.0-next.2
673
+ - @backstage-community/plugin-cicd-statistics@0.1.14-next.3
674
+
675
+ ## 0.1.8-next.2
676
+
677
+ ### Patch Changes
678
+
679
+ - Updated dependencies
680
+ - @backstage/core-plugin-api@1.2.0-next.2
681
+ - @backstage-community/plugin-cicd-statistics@0.1.14-next.2
682
+ - @backstage/catalog-model@1.1.4-next.1
683
+
684
+ ## 0.1.8-next.1
685
+
686
+ ### Patch Changes
687
+
688
+ - Updated dependencies
689
+ - @backstage/core-plugin-api@1.1.1-next.1
690
+ - @backstage/catalog-model@1.1.4-next.1
691
+ - @backstage-community/plugin-cicd-statistics@0.1.14-next.1
692
+
693
+ ## 0.1.8-next.0
694
+
695
+ ### Patch Changes
696
+
697
+ - Updated dependencies
698
+ - @backstage/core-plugin-api@1.1.1-next.0
699
+ - @backstage/catalog-model@1.1.4-next.0
700
+ - @backstage-community/plugin-cicd-statistics@0.1.14-next.0
701
+
702
+ ## 0.1.7
703
+
704
+ ### Patch Changes
705
+
706
+ - Updated dependencies
707
+ - @backstage/core-plugin-api@1.1.0
708
+ - @backstage/catalog-model@1.1.3
709
+ - @backstage-community/plugin-cicd-statistics@0.1.13
710
+
711
+ ## 0.1.7-next.1
712
+
713
+ ### Patch Changes
714
+
715
+ - Updated dependencies
716
+ - @backstage/catalog-model@1.1.3-next.0
717
+ - @backstage/core-plugin-api@1.1.0-next.0
718
+ - @backstage-community/plugin-cicd-statistics@0.1.13-next.1
719
+
720
+ ## 0.1.7-next.0
721
+
722
+ ### Patch Changes
723
+
724
+ - Updated dependencies
725
+ - @backstage/core-plugin-api@1.1.0-next.0
726
+ - @backstage/catalog-model@1.1.3-next.0
727
+ - @backstage-community/plugin-cicd-statistics@0.1.13-next.0
728
+
729
+ ## 0.1.6
730
+
731
+ ### Patch Changes
732
+
733
+ - Updated dependencies
734
+ - @backstage/catalog-model@1.1.2
735
+ - @backstage-community/plugin-cicd-statistics@0.1.12
736
+ - @backstage/core-plugin-api@1.0.7
737
+
738
+ ## 0.1.6-next.2
739
+
740
+ ### Patch Changes
741
+
742
+ - Updated dependencies
743
+ - @backstage/catalog-model@1.1.2-next.2
744
+ - @backstage/core-plugin-api@1.0.7-next.2
745
+ - @backstage-community/plugin-cicd-statistics@0.1.12-next.2
746
+
747
+ ## 0.1.6-next.1
748
+
749
+ ### Patch Changes
750
+
751
+ - Updated dependencies
752
+ - @backstage-community/plugin-cicd-statistics@0.1.12-next.1
753
+ - @backstage/core-plugin-api@1.0.7-next.1
754
+ - @backstage/catalog-model@1.1.2-next.1
755
+
756
+ ## 0.1.6-next.0
757
+
758
+ ### Patch Changes
759
+
760
+ - Updated dependencies
761
+ - @backstage/catalog-model@1.1.2-next.0
762
+ - @backstage-community/plugin-cicd-statistics@0.1.12-next.0
763
+ - @backstage/core-plugin-api@1.0.7-next.0
764
+
765
+ ## 0.1.5
766
+
767
+ ### Patch Changes
768
+
769
+ - 71b7464a7c: Fixing typo in the Readme file: `'@backstage plugin-cicd-statistics-module-gitlab';` -> `'@backstage-community/plugin-cicd-statistics-module-gitlab';`
770
+ - a98f5d4c21: add the ability to add CICD default options to createGitlabApi constructor
771
+ - Updated dependencies
772
+ - @backstage/core-plugin-api@1.0.6
773
+ - @backstage/catalog-model@1.1.1
774
+ - @backstage-community/plugin-cicd-statistics@0.1.11
775
+
776
+ ## 0.1.5-next.1
777
+
778
+ ### Patch Changes
779
+
780
+ - Updated dependencies
781
+ - @backstage/catalog-model@1.1.1-next.0
782
+ - @backstage/core-plugin-api@1.0.6-next.3
783
+ - @backstage-community/plugin-cicd-statistics@0.1.11-next.2
784
+
785
+ ## 0.1.5-next.0
786
+
787
+ ### Patch Changes
788
+
789
+ - Updated dependencies
790
+ - @backstage/core-plugin-api@1.0.6-next.0
791
+ - @backstage-community/plugin-cicd-statistics@0.1.11-next.0
792
+
793
+ ## 0.1.4
794
+
795
+ ### Patch Changes
796
+
797
+ - Updated dependencies
798
+ - @backstage/core-plugin-api@1.0.5
799
+ - @backstage-community/plugin-cicd-statistics@0.1.10
800
+
801
+ ## 0.1.4-next.0
802
+
803
+ ### Patch Changes
804
+
805
+ - Updated dependencies
806
+ - @backstage/core-plugin-api@1.0.5-next.0
807
+ - @backstage-community/plugin-cicd-statistics@0.1.10-next.0
808
+
809
+ ## 0.1.3
810
+
811
+ ### Patch Changes
812
+
813
+ - 4e9a90e307: Updated dependency `luxon` to `^3.0.0`.
814
+ - Updated dependencies
815
+ - @backstage/catalog-model@1.1.0
816
+ - @backstage/core-plugin-api@1.0.4
817
+ - @backstage-community/plugin-cicd-statistics@0.1.9
818
+
819
+ ## 0.1.3-next.1
820
+
821
+ ### Patch Changes
822
+
823
+ - 4e9a90e307: Updated dependency `luxon` to `^3.0.0`.
824
+ - Updated dependencies
825
+ - @backstage/core-plugin-api@1.0.4-next.0
826
+ - @backstage-community/plugin-cicd-statistics@0.1.9-next.1
827
+ - @backstage/catalog-model@1.1.0-next.3
828
+
829
+ ## 0.1.3-next.0
830
+
831
+ ### Patch Changes
832
+
833
+ - Updated dependencies
834
+ - @backstage/catalog-model@1.1.0-next.0
835
+ - @backstage-community/plugin-cicd-statistics@0.1.9-next.0
836
+
837
+ ## 0.1.2
838
+
839
+ ### Patch Changes
840
+
841
+ - Updated dependencies
842
+ - @backstage/core-plugin-api@1.0.3
843
+ - @backstage/catalog-model@1.0.3
844
+ - @backstage-community/plugin-cicd-statistics@0.1.8
845
+
846
+ ## 0.1.2-next.1
847
+
848
+ ### Patch Changes
849
+
850
+ - Updated dependencies
851
+ - @backstage/core-plugin-api@1.0.3-next.0
852
+ - @backstage/catalog-model@1.0.3-next.0
853
+ - @backstage-community/plugin-cicd-statistics@0.1.8-next.1
854
+
855
+ ## 0.1.2-next.0
856
+
857
+ ### Patch Changes
858
+
859
+ - Updated dependencies
860
+ - @backstage-community/plugin-cicd-statistics@0.1.8-next.0
861
+
862
+ ## 0.1.1
863
+
864
+ ### Patch Changes
865
+
866
+ - Updated dependencies
867
+ - @backstage/core-plugin-api@1.0.2
868
+ - @backstage/catalog-model@1.0.2
869
+ - @backstage-community/plugin-cicd-statistics@0.1.7
870
+
871
+ ## 0.1.1-next.2
872
+
873
+ ### Patch Changes
874
+
875
+ - Updated dependencies
876
+ - @backstage/catalog-model@1.0.2-next.0
877
+ - @backstage/core-plugin-api@1.0.2-next.1
878
+ - @backstage-community/plugin-cicd-statistics@0.1.7-next.2
879
+
880
+ ## 0.1.1-next.1
881
+
882
+ ### Patch Changes
883
+
884
+ - Updated dependencies
885
+ - @backstage/core-plugin-api@1.0.2-next.0
886
+ - @backstage-community/plugin-cicd-statistics@0.1.7-next.1
887
+
888
+ ## 0.1.1-next.0
889
+
890
+ ### Patch Changes
891
+
892
+ - Updated dependencies
893
+ - @backstage-community/plugin-cicd-statistics@0.1.7-next.0
894
+
895
+ ## 0.1.0
896
+
897
+ ### Minor Changes
898
+
899
+ - d3af30b47d: Created a module to extract the CI/CD statistics from a Gitlab repository.
900
+ Read the `README.md` in the `cicd-statistics-module-gitlab` plugin folder on how to set it up.
901
+
902
+ ### Patch Changes
903
+
904
+ - Updated dependencies
905
+ - @backstage/catalog-model@1.0.1
906
+ - @backstage/core-plugin-api@1.0.1
907
+ - @backstage-community/plugin-cicd-statistics@0.1.6
908
+
909
+ ## 0.1.0-next.0
910
+
911
+ ### Minor Changes
912
+
913
+ - d3af30b47d: Created a module to extract the CI/CD statistics from a Gitlab repository.
914
+ Read the `README.md` in the `cicd-statistics-module-gitlab` plugin folder on how to set it up.
915
+
916
+ ### Patch Changes
917
+
918
+ - Updated dependencies
919
+ - @backstage/core-plugin-api@1.0.1-next.0
920
+ - @backstage-community/plugin-cicd-statistics@0.1.6-next.1
package/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # cicd-statistics-module-gitlab
2
+
3
+ This is an extension module to the `cicd-statistics` plugin, providing a `CicdStatisticsApiGitlab` that you can use to extract the CI/CD statistics from your Gitlab repository.
4
+
5
+ ## Getting started
6
+
7
+ 1. Install the `cicd-statistics` and `cicd-statistics-module-gitlab` plugins in the `app` package.
8
+
9
+ 2. Configure your ApiFactory:
10
+ - You can optionally pass in a second argument to `CicdStatisticsApiGitlab` of type [CicdDefaults](https://github.com/backstage/backstage/blob/2881c53cb383bf127c150f837f37fe535d8cf97b/plugins/cicd-statistics/src/apis/types.ts#L179) to alter the default CICD UI configuration
11
+
12
+ ```tsx
13
+ // packages/app/src/apis.ts
14
+ import { gitlabAuthApiRef } from '@backstage/core-plugin-api';
15
+
16
+ import { cicdStatisticsApiRef } from '@backstage-community/plugin-cicd-statistics';
17
+ import { CicdStatisticsApiGitlab } from '@backstage-community/plugin-cicd-statistics-module-gitlab';
18
+
19
+ export const apis: AnyApiFactory[] = [
20
+ createApiFactory({
21
+ api: cicdStatisticsApiRef,
22
+ deps: { gitlabAuthApi: gitlabAuthApiRef },
23
+ factory({ gitlabAuthApi }) {
24
+ return new CicdStatisticsApiGitlab(gitlabAuthApi);
25
+ },
26
+ }),
27
+ ];
28
+ ```
29
+
30
+ 3. Add the component to your EntityPage:
31
+
32
+ ```tsx
33
+ // packages/app/src/components/catalog/EntityPage.tsx
34
+ import { EntityCicdStatisticsContent } from '@backstage-community/plugin-cicd-statistics';
35
+
36
+ <EntityLayout.Route path="/ci-cd-statistics" title="CI/CD Statistics">
37
+ <EntityCicdStatisticsContent />
38
+ </EntityLayout.Route>;
39
+ ```
@@ -0,0 +1,31 @@
1
+ import { CicdStatisticsApi, CicdDefaults, FetchBuildsOptions, CicdState, CicdConfiguration } from '@backstage-community/plugin-cicd-statistics';
2
+ import { Gitlab } from '@gitbeaker/browser';
3
+ import { OAuthApi } from '@backstage/core-plugin-api';
4
+ import { Entity } from '@backstage/catalog-model';
5
+
6
+ /**
7
+ * This type represents a initialized gitlab client with gitbeaker
8
+ *
9
+ * @public
10
+ */
11
+ type GitlabClient = {
12
+ api: InstanceType<typeof Gitlab>;
13
+ owner: string;
14
+ };
15
+ /**
16
+ * Extracts the CI/CD statistics from a Gitlab repository
17
+ *
18
+ * @public
19
+ */
20
+ declare class CicdStatisticsApiGitlab implements CicdStatisticsApi {
21
+ #private;
22
+ constructor(gitLabAuthApi: OAuthApi, cicdDefaults?: Partial<CicdDefaults>);
23
+ createGitlabApi(entity: Entity, scopes: string[]): Promise<GitlabClient>;
24
+ private static updateBuildWithStages;
25
+ private static getDurationOfBuild;
26
+ private static getDefaultBranch;
27
+ fetchBuilds(options: FetchBuildsOptions): Promise<CicdState>;
28
+ getConfiguration(): Promise<Partial<CicdConfiguration>>;
29
+ }
30
+
31
+ export { CicdStatisticsApiGitlab, type GitlabClient };
@@ -0,0 +1,171 @@
1
+ import { Gitlab } from '@gitbeaker/browser';
2
+ import limiterFactory from 'p-limit';
3
+ import { getEntitySourceLocation } from '@backstage/catalog-model';
4
+
5
+ const statusMap = {
6
+ manual: "unknown",
7
+ created: "enqueued",
8
+ waiting_for_resource: "stalled",
9
+ preparing: "unknown",
10
+ pending: "scheduled",
11
+ running: "running",
12
+ success: "succeeded",
13
+ failed: "failed",
14
+ canceled: "aborted",
15
+ skipped: "aborted",
16
+ scheduled: "scheduled"
17
+ };
18
+ const triggerReasonMap = {
19
+ push: "scm",
20
+ trigger: "manual",
21
+ merge_request_event: "scm",
22
+ schedule: "internal"
23
+ };
24
+ function pipelinesToBuilds(pipelines) {
25
+ return pipelines.map((pipeline) => {
26
+ var _a;
27
+ return {
28
+ id: pipeline.id.toString(),
29
+ status: statusMap[pipeline.status],
30
+ branchType: "master",
31
+ duration: 0,
32
+ // will get filled in later in a seperate API call
33
+ requestedAt: new Date(pipeline.created_at),
34
+ triggeredBy: (_a = triggerReasonMap[pipeline.source]) != null ? _a : "other",
35
+ stages: []
36
+ };
37
+ });
38
+ }
39
+ function jobsToStages(jobs) {
40
+ return jobs.map((job) => {
41
+ const status = statusMap[job.status] ? statusMap[job.status] : "unknown";
42
+ const duration = job.duration ? job.duration * 1e3 : 0;
43
+ return {
44
+ name: job.stage,
45
+ status,
46
+ duration,
47
+ stages: job.name !== job.stage ? [
48
+ {
49
+ name: job.name,
50
+ status,
51
+ duration
52
+ }
53
+ ] : []
54
+ };
55
+ });
56
+ }
57
+
58
+ var __accessCheck = (obj, member, msg) => {
59
+ if (!member.has(obj))
60
+ throw TypeError("Cannot " + msg);
61
+ };
62
+ var __privateGet = (obj, member, getter) => {
63
+ __accessCheck(obj, member, "read from private field");
64
+ return getter ? getter.call(obj) : member.get(obj);
65
+ };
66
+ var __privateAdd = (obj, member, value) => {
67
+ if (member.has(obj))
68
+ throw TypeError("Cannot add the same private member more than once");
69
+ member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
70
+ };
71
+ var __privateSet = (obj, member, value, setter) => {
72
+ __accessCheck(obj, member, "write to private field");
73
+ setter ? setter.call(obj, value) : member.set(obj, value);
74
+ return value;
75
+ };
76
+ var _gitLabAuthApi, _cicdDefaults;
77
+ const _CicdStatisticsApiGitlab = class _CicdStatisticsApiGitlab {
78
+ constructor(gitLabAuthApi, cicdDefaults = {}) {
79
+ __privateAdd(this, _gitLabAuthApi, void 0);
80
+ __privateAdd(this, _cicdDefaults, void 0);
81
+ __privateSet(this, _gitLabAuthApi, gitLabAuthApi);
82
+ __privateSet(this, _cicdDefaults, cicdDefaults);
83
+ }
84
+ async createGitlabApi(entity, scopes) {
85
+ const entityInfo = getEntitySourceLocation(entity);
86
+ const url = new URL(entityInfo.target);
87
+ const owner = url.pathname.split("/-/blob/")[0];
88
+ const oauthToken = await __privateGet(this, _gitLabAuthApi).getAccessToken(scopes);
89
+ return {
90
+ api: new Gitlab({
91
+ host: `https://${url.host}`,
92
+ oauthToken
93
+ }),
94
+ owner: owner.substring(1)
95
+ };
96
+ }
97
+ static async updateBuildWithStages(gitbeaker, owner, build) {
98
+ const jobs = await gitbeaker.Jobs.showPipelineJobs(
99
+ owner,
100
+ parseInt(build.id, 10)
101
+ );
102
+ const stages = jobsToStages(jobs);
103
+ return stages;
104
+ }
105
+ static async getDurationOfBuild(gitbeaker, owner, build) {
106
+ const pipeline = await gitbeaker.Pipelines.show(
107
+ owner,
108
+ parseInt(build.id, 10)
109
+ );
110
+ return parseInt(pipeline.duration, 10) * 1e3;
111
+ }
112
+ static async getDefaultBranch(gitbeaker, owner) {
113
+ var _a;
114
+ const branches = await gitbeaker.Branches.all(owner);
115
+ return (_a = branches.find((branch) => branch.default)) == null ? void 0 : _a.name;
116
+ }
117
+ async fetchBuilds(options) {
118
+ const {
119
+ entity,
120
+ updateProgress,
121
+ timeFrom,
122
+ timeTo,
123
+ filterStatus = ["all"],
124
+ filterType = "all"
125
+ } = options;
126
+ const { api, owner } = await this.createGitlabApi(entity, ["read_api"]);
127
+ updateProgress(0, 0, 0);
128
+ const branch = filterType === "master" ? await _CicdStatisticsApiGitlab.getDefaultBranch(api, owner) : void 0;
129
+ const pipelines = await api.Pipelines.all(owner, {
130
+ perPage: 25,
131
+ updated_after: timeFrom.toISOString(),
132
+ updated_before: timeTo.toISOString(),
133
+ ref: branch
134
+ });
135
+ const limiter = limiterFactory(10);
136
+ const builds = pipelinesToBuilds(pipelines).map(async (build) => ({
137
+ ...build,
138
+ duration: await limiter(
139
+ () => _CicdStatisticsApiGitlab.getDurationOfBuild(api, owner, build)
140
+ ),
141
+ stages: await limiter(
142
+ () => _CicdStatisticsApiGitlab.updateBuildWithStages(api, owner, build)
143
+ )
144
+ }));
145
+ const promisedBuilds = (await Promise.all(builds)).filter(
146
+ (b) => filterStatus.includes(b.status)
147
+ );
148
+ return { builds: promisedBuilds };
149
+ }
150
+ async getConfiguration() {
151
+ return {
152
+ availableStatuses: [
153
+ "succeeded",
154
+ "failed",
155
+ "enqueued",
156
+ "running",
157
+ "aborted",
158
+ "stalled",
159
+ "expired",
160
+ "unknown"
161
+ ],
162
+ defaults: __privateGet(this, _cicdDefaults)
163
+ };
164
+ }
165
+ };
166
+ _gitLabAuthApi = new WeakMap();
167
+ _cicdDefaults = new WeakMap();
168
+ let CicdStatisticsApiGitlab = _CicdStatisticsApiGitlab;
169
+
170
+ export { CicdStatisticsApiGitlab };
171
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../src/api/utils.ts","../src/api/gitlab.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Build,\n FilterStatusType,\n TriggerReason,\n Stage,\n} from '@backstage-community/plugin-cicd-statistics';\nimport { Types } from '@gitbeaker/core';\n\nconst statusMap: Record<string, FilterStatusType> = {\n manual: 'unknown',\n created: 'enqueued',\n waiting_for_resource: 'stalled',\n preparing: 'unknown',\n pending: 'scheduled',\n running: 'running',\n success: 'succeeded',\n failed: 'failed',\n canceled: 'aborted',\n skipped: 'aborted',\n scheduled: 'scheduled',\n};\n\n// all gitlab trigger reasons can be found here: https://docs.gitlab.com/ee/api/pipelines.html#list-project-pipelines\nconst triggerReasonMap: Record<string, TriggerReason> = {\n push: 'scm',\n trigger: 'manual',\n merge_request_event: 'scm',\n schedule: 'internal',\n};\n\n/**\n * Takes the Pipeline object from Gitlab and transforms it to the Build object\n *\n * @param pipelines - Pipeline object that gets returned from Gitlab\n *\n * @public\n */\nexport function pipelinesToBuilds(\n pipelines: Array<Types.PipelineSchema>,\n): Build[] {\n return pipelines.map(pipeline => {\n return {\n id: pipeline.id.toString(),\n status: statusMap[pipeline.status],\n branchType: 'master',\n duration: 0, // will get filled in later in a seperate API call\n requestedAt: new Date(pipeline.created_at),\n triggeredBy: triggerReasonMap[pipeline.source as string] ?? 'other',\n stages: [],\n };\n });\n}\n\n/**\n * Takes the Job object from Gitlab and transforms it to the Stage object\n *\n * @param jobs - Job object that gets returned from Gitlab\n *\n * @public\n *\n * @remarks\n *\n * The Gitlab API can only return the job (sub-stage) of a pipeline and not a whole stage\n * The job does return from which stage it is\n * So, for the stage name we use the parent stage name and in the sub-stages we add the current job\n * In the end the cicd-statistics plugin will calculate the right durations for each stage\n *\n * Furthermore, we don't add the job to the sub-stage if it is has the same name as the parent stage\n * We then assume that the stage has no sub-stages\n */\nexport function jobsToStages(jobs: Array<Types.JobSchema>): Stage[] {\n return jobs.map(job => {\n const status = statusMap[job.status] ? statusMap[job.status] : 'unknown';\n const duration = job.duration ? ((job.duration * 1000) as number) : 0;\n return {\n name: job.stage,\n status,\n duration,\n stages:\n job.name !== job.stage\n ? [\n {\n name: job.name,\n status,\n duration,\n },\n ]\n : [],\n };\n });\n}\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n CicdStatisticsApi,\n CicdState,\n CicdConfiguration,\n CicdDefaults,\n Build,\n FetchBuildsOptions,\n Stage,\n} from '@backstage-community/plugin-cicd-statistics';\nimport { Gitlab } from '@gitbeaker/browser';\nimport { OAuthApi } from '@backstage/core-plugin-api';\nimport limiterFactory from 'p-limit';\nimport { Entity, getEntitySourceLocation } from '@backstage/catalog-model';\nimport { pipelinesToBuilds, jobsToStages } from './utils';\n\n/**\n * This type represents a initialized gitlab client with gitbeaker\n *\n * @public\n */\nexport type GitlabClient = {\n /* the actual API of gitbeaker */\n api: InstanceType<typeof Gitlab>;\n /* the owner the repository, retrieved from the entity source location */\n owner: string;\n};\n\n/**\n * Extracts the CI/CD statistics from a Gitlab repository\n *\n * @public\n */\nexport class CicdStatisticsApiGitlab implements CicdStatisticsApi {\n readonly #gitLabAuthApi: OAuthApi;\n readonly #cicdDefaults: Partial<CicdDefaults>;\n\n constructor(\n gitLabAuthApi: OAuthApi,\n cicdDefaults: Partial<CicdDefaults> = {},\n ) {\n this.#gitLabAuthApi = gitLabAuthApi;\n this.#cicdDefaults = cicdDefaults;\n }\n\n public async createGitlabApi(\n entity: Entity,\n scopes: string[],\n ): Promise<GitlabClient> {\n const entityInfo = getEntitySourceLocation(entity);\n const url = new URL(entityInfo.target);\n const owner = url.pathname.split('/-/blob/')[0];\n const oauthToken = await this.#gitLabAuthApi.getAccessToken(scopes);\n return {\n api: new Gitlab({\n host: `https://${url.host}`,\n oauthToken,\n }),\n owner: owner.substring(1),\n };\n }\n\n private static async updateBuildWithStages(\n gitbeaker: InstanceType<typeof Gitlab>,\n owner: string,\n build: Build,\n ): Promise<Stage[]> {\n const jobs = await gitbeaker.Jobs.showPipelineJobs(\n owner,\n parseInt(build.id, 10),\n );\n const stages = jobsToStages(jobs);\n return stages;\n }\n\n private static async getDurationOfBuild(\n gitbeaker: InstanceType<typeof Gitlab>,\n owner: string,\n build: Build,\n ): Promise<number> {\n const pipeline = await gitbeaker.Pipelines.show(\n owner,\n parseInt(build.id, 10),\n );\n return parseInt(pipeline.duration as string, 10) * 1000;\n }\n\n private static async getDefaultBranch(\n gitbeaker: InstanceType<typeof Gitlab>,\n owner: string,\n ): Promise<string | undefined> {\n const branches = await gitbeaker.Branches.all(owner);\n return branches.find(branch => branch.default)?.name;\n }\n\n public async fetchBuilds(options: FetchBuildsOptions): Promise<CicdState> {\n const {\n entity,\n updateProgress,\n timeFrom,\n timeTo,\n filterStatus = ['all'],\n filterType = 'all',\n } = options;\n const { api, owner } = await this.createGitlabApi(entity, ['read_api']);\n updateProgress(0, 0, 0);\n\n const branch =\n filterType === 'master'\n ? await CicdStatisticsApiGitlab.getDefaultBranch(api, owner)\n : undefined;\n const pipelines = await api.Pipelines.all(owner, {\n perPage: 25,\n updated_after: timeFrom.toISOString(),\n updated_before: timeTo.toISOString(),\n ref: branch,\n });\n\n const limiter = limiterFactory(10);\n const builds = pipelinesToBuilds(pipelines).map(async build => ({\n ...build,\n duration: await limiter(() =>\n CicdStatisticsApiGitlab.getDurationOfBuild(api, owner, build),\n ),\n stages: await limiter(() =>\n CicdStatisticsApiGitlab.updateBuildWithStages(api, owner, build),\n ),\n }));\n const promisedBuilds = (await Promise.all(builds)).filter(b =>\n filterStatus.includes(b.status),\n );\n\n return { builds: promisedBuilds };\n }\n\n public async getConfiguration(): Promise<Partial<CicdConfiguration>> {\n return {\n availableStatuses: [\n 'succeeded',\n 'failed',\n 'enqueued',\n 'running',\n 'aborted',\n 'stalled',\n 'expired',\n 'unknown',\n ] as const,\n defaults: this.#cicdDefaults,\n };\n }\n}\n"],"names":[],"mappings":";;;;AAwBA,MAAM,SAA8C,GAAA;AAAA,EAClD,MAAQ,EAAA,SAAA;AAAA,EACR,OAAS,EAAA,UAAA;AAAA,EACT,oBAAsB,EAAA,SAAA;AAAA,EACtB,SAAW,EAAA,SAAA;AAAA,EACX,OAAS,EAAA,WAAA;AAAA,EACT,OAAS,EAAA,SAAA;AAAA,EACT,OAAS,EAAA,WAAA;AAAA,EACT,MAAQ,EAAA,QAAA;AAAA,EACR,QAAU,EAAA,SAAA;AAAA,EACV,OAAS,EAAA,SAAA;AAAA,EACT,SAAW,EAAA,WAAA;AACb,CAAA,CAAA;AAGA,MAAM,gBAAkD,GAAA;AAAA,EACtD,IAAM,EAAA,KAAA;AAAA,EACN,OAAS,EAAA,QAAA;AAAA,EACT,mBAAqB,EAAA,KAAA;AAAA,EACrB,QAAU,EAAA,UAAA;AACZ,CAAA,CAAA;AASO,SAAS,kBACd,SACS,EAAA;AACT,EAAO,OAAA,SAAA,CAAU,IAAI,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jB,CAAA;AAAA,GACF;AACF,CAAA,CAAA;AApHW,cAAA,GAAA,IAAA,OAAA,EAAA,CAAA;AACA,aAAA,GAAA,IAAA,OAAA,EAAA,CAAA;AAFJ,IAAM,uBAAN,GAAA;;;;"}
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@backstage-community/plugin-cicd-statistics-module-gitlab",
3
+ "version": "0.1.31",
4
+ "description": "CI/CD Statistics plugin module; Gitlab CICD",
5
+ "backstage": {
6
+ "role": "frontend-plugin-module"
7
+ },
8
+ "publishConfig": {
9
+ "access": "public",
10
+ "main": "dist/index.esm.js",
11
+ "types": "dist/index.d.ts"
12
+ },
13
+ "keywords": [
14
+ "backstage",
15
+ "cicd statistics",
16
+ "gitlab"
17
+ ],
18
+ "homepage": "https://backstage.io",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "https://github.com/backstage/community-plugins",
22
+ "directory": "workspaces/cicd-statistics/plugins/cicd-statistics-module-gitlab"
23
+ },
24
+ "license": "Apache-2.0",
25
+ "sideEffects": false,
26
+ "main": "dist/index.esm.js",
27
+ "types": "dist/index.d.ts",
28
+ "files": [
29
+ "dist"
30
+ ],
31
+ "scripts": {
32
+ "build": "backstage-cli package build",
33
+ "clean": "backstage-cli package clean",
34
+ "lint": "backstage-cli package lint",
35
+ "prepack": "backstage-cli package prepack",
36
+ "postpack": "backstage-cli package postpack",
37
+ "test": "backstage-cli package test"
38
+ },
39
+ "dependencies": {
40
+ "@backstage-community/plugin-cicd-statistics": "^0.1.37",
41
+ "@backstage/catalog-model": "^1.4.5",
42
+ "@backstage/core-plugin-api": "^1.9.2",
43
+ "@gitbeaker/browser": "^35.6.0",
44
+ "@gitbeaker/core": "^35.6.0",
45
+ "luxon": "^3.0.0",
46
+ "p-limit": "^3.1.0"
47
+ },
48
+ "devDependencies": {
49
+ "@backstage/cli": "^0.26.3",
50
+ "@types/react": "^16.13.1 || ^17.0.0",
51
+ "@types/react-dom": "^18.2.19",
52
+ "react": "^16.13.1 || ^17.0.0 || ^18.0.0",
53
+ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
54
+ "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
55
+ },
56
+ "peerDependencies": {
57
+ "react": "^16.13.1 || ^17.0.0 || ^18.0.0",
58
+ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
59
+ "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
60
+ },
61
+ "module": "./dist/index.esm.js"
62
+ }