@unitedstatespowersquadrons/components 1.3.0-3 → 1.3.0
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/Badges/Suite.tsx +5 -3
- package/Badges/types.ts +4 -4
- package/package.json +1 -1
package/Badges/Suite.tsx
CHANGED
|
@@ -14,7 +14,7 @@ const SuiteBadge = (props: Props) => {
|
|
|
14
14
|
if (!suite || !suite.status) return null;
|
|
15
15
|
|
|
16
16
|
const suiteBadgeColor = () => {
|
|
17
|
-
if (suite.
|
|
17
|
+
if (suite.skipCi) return "lightgray";
|
|
18
18
|
|
|
19
19
|
switch (suite.status) {
|
|
20
20
|
case "queued":
|
|
@@ -23,6 +23,7 @@ const SuiteBadge = (props: Props) => {
|
|
|
23
23
|
case "waiting":
|
|
24
24
|
case "pending":
|
|
25
25
|
return "yellow";
|
|
26
|
+
|
|
26
27
|
case "completed":
|
|
27
28
|
switch (suite.conclusion) {
|
|
28
29
|
case "success": return "brightgreen";
|
|
@@ -32,6 +33,7 @@ const SuiteBadge = (props: Props) => {
|
|
|
32
33
|
case "cancelled": return "orange";
|
|
33
34
|
default: return "lightgray";
|
|
34
35
|
}
|
|
36
|
+
|
|
35
37
|
default:
|
|
36
38
|
return "lightgray";
|
|
37
39
|
}
|
|
@@ -40,8 +42,8 @@ const SuiteBadge = (props: Props) => {
|
|
|
40
42
|
const titleize = (text: string) =>
|
|
41
43
|
text.replace(/(^|\s)\S/g, t => t.toUpperCase());
|
|
42
44
|
|
|
43
|
-
const branch = badgeify(suite.
|
|
44
|
-
const description = suite.
|
|
45
|
+
const branch = badgeify(suite.headBranch);
|
|
46
|
+
const description = suite.skipCi
|
|
45
47
|
? "Skipped"
|
|
46
48
|
: suite.status === "completed"
|
|
47
49
|
? badgeify(titleize(suite.conclusion || ""))
|
package/Badges/types.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export interface CheckSuite {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
headBranch: string;
|
|
3
|
+
headAha?: string;
|
|
4
4
|
status: string;
|
|
5
5
|
conclusion?: string;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
updatedAt?: string;
|
|
7
|
+
skipCi: boolean;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export interface ReachableStatus {
|