@unitedstatespowersquadrons/components 1.3.0-2 → 1.3.0-4

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 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.skip_ci) return "lightgray";
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.head_branch);
44
- const description = suite.skip_ci
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/index.ts CHANGED
@@ -24,6 +24,8 @@ export { default as RepoBadge } from "./Repo";
24
24
  export { default as SuiteBadge } from "./Suite";
25
25
  export { default as TagBadge } from "./Tag";
26
26
 
27
+ export type { CheckSuite, ReachableStatus } from "./types";
28
+
27
29
  export default {
28
30
  Badge,
29
31
  Branch,
package/Badges/types.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  export interface CheckSuite {
2
- head_branch: string;
3
- head_sha?: string;
2
+ headBranch: string;
3
+ headAha?: string;
4
4
  status: string;
5
5
  conclusion?: string;
6
- updated_at?: string;
7
- skip_ci: boolean;
6
+ updatedAt?: string;
7
+ skipCi: boolean;
8
8
  }
9
9
 
10
10
  export interface ReachableStatus {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unitedstatespowersquadrons/components",
3
- "version": "1.3.0-2",
3
+ "version": "1.3.0-4",
4
4
  "description": "USPS shared React components library",
5
5
  "main": "index.tsx",
6
6
  "scripts": {