pi-pr-status 0.1.0 → 0.1.1
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/lib/github.ts +13 -3
- package/package.json +11 -3
package/lib/github.ts
CHANGED
|
@@ -58,9 +58,14 @@ export function parseChecks(statusCheckRollup: unknown[]): CheckStatus {
|
|
|
58
58
|
const checks: CheckStatus = { total: 0, pass: 0, fail: 0, pending: 0 };
|
|
59
59
|
for (const check of statusCheckRollup) {
|
|
60
60
|
const c = check as Record<string, string>;
|
|
61
|
-
checks.total++;
|
|
62
61
|
const conclusion = (c.conclusion || "").toUpperCase();
|
|
63
62
|
const status = (c.status || "").toUpperCase();
|
|
63
|
+
const name = c.name || "";
|
|
64
|
+
|
|
65
|
+
// Skip ghost checks with no meaningful data (e.g. Vercel deployment statuses)
|
|
66
|
+
if (!name && !conclusion && !status) continue;
|
|
67
|
+
|
|
68
|
+
checks.total++;
|
|
64
69
|
if (conclusion === "SUCCESS" || conclusion === "NEUTRAL" || conclusion === "SKIPPED") {
|
|
65
70
|
checks.pass++;
|
|
66
71
|
} else if (
|
|
@@ -74,10 +79,15 @@ export function parseChecks(statusCheckRollup: unknown[]): CheckStatus {
|
|
|
74
79
|
status === "IN_PROGRESS" ||
|
|
75
80
|
status === "QUEUED" ||
|
|
76
81
|
status === "PENDING" ||
|
|
77
|
-
status === "WAITING"
|
|
78
|
-
!conclusion
|
|
82
|
+
status === "WAITING"
|
|
79
83
|
) {
|
|
80
84
|
checks.pending++;
|
|
85
|
+
} else if (status === "COMPLETED") {
|
|
86
|
+
// Completed but no recognized conclusion — treat as passed
|
|
87
|
+
checks.pass++;
|
|
88
|
+
} else {
|
|
89
|
+
// Unknown state — treat as pending
|
|
90
|
+
checks.pending++;
|
|
81
91
|
}
|
|
82
92
|
}
|
|
83
93
|
return checks;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-pr-status",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "A Pi extension that shows the current PR link, CI check status, and unresolved review comments in the footer status bar",
|
|
5
5
|
"author": "Bruno Garcia",
|
|
6
6
|
"license": "MIT",
|
|
@@ -9,7 +9,13 @@
|
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/bruno-garcia/pi-pr-status"
|
|
11
11
|
},
|
|
12
|
-
"keywords": [
|
|
12
|
+
"keywords": [
|
|
13
|
+
"pi-package",
|
|
14
|
+
"github",
|
|
15
|
+
"pull-request",
|
|
16
|
+
"ci",
|
|
17
|
+
"pi-extension"
|
|
18
|
+
],
|
|
13
19
|
"files": [
|
|
14
20
|
"extensions/pr-status.ts",
|
|
15
21
|
"lib/github.ts",
|
|
@@ -24,7 +30,9 @@
|
|
|
24
30
|
"vitest": "^3.0.0"
|
|
25
31
|
},
|
|
26
32
|
"pi": {
|
|
27
|
-
"extensions": [
|
|
33
|
+
"extensions": [
|
|
34
|
+
"./extensions"
|
|
35
|
+
]
|
|
28
36
|
},
|
|
29
37
|
"scripts": {
|
|
30
38
|
"test": "vitest run",
|