@jwilger/pi-development-system 0.8.10 → 0.9.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/package.json
CHANGED
|
@@ -52,7 +52,7 @@ hides every later failure. A push to a red trunk is a hard stop unless the
|
|
|
52
52
|
commit is `fix(ci): …` (or another `fix`), touches only what the failing log names, and
|
|
53
53
|
stays small (an unpushed diff over 8000 characters is never exempt); Jev must read it as
|
|
54
54
|
only repairing the failing run, which needs the failing log and Jev online. Otherwise the
|
|
55
|
-
push is a hard stop. If `gh`
|
|
55
|
+
push is a hard stop. A call that commits and pushes together on a red trunk is refused outright (commit in one call, push in the next). If `gh`
|
|
56
56
|
is missing or unauthenticated, CI reads as unknown and the push is allowed:
|
|
57
57
|
check CI by other means before relying on it.
|
|
58
58
|
|
package/src/state/ci-command.ts
CHANGED
|
@@ -53,10 +53,14 @@ export async function runCiWatch(
|
|
|
53
53
|
deps.pi.appendEntry(CI_ENTRY_TYPE, observed);
|
|
54
54
|
},
|
|
55
55
|
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
try {
|
|
57
|
+
ctx.ui.notify(
|
|
58
|
+
`CI on ${config.value.delivery.trunk}: ${final.status}${final.sha === undefined ? "" : ` (${final.sha.slice(0, 7)})`}`,
|
|
59
|
+
final.status === "red" ? "error" : "info",
|
|
60
|
+
);
|
|
61
|
+
} catch {
|
|
62
|
+
// stale context after a reload: the status line and entries were already updated
|
|
63
|
+
}
|
|
60
64
|
return final;
|
|
61
65
|
}
|
|
62
66
|
|
|
@@ -67,10 +71,15 @@ export function registerCiCommand(deps: CiCommandDeps): void {
|
|
|
67
71
|
handler: async (_args, ctx) => {
|
|
68
72
|
ctx.ui.notify("watching CI on the trunk…", "info");
|
|
69
73
|
runCiWatch(deps, ctx).catch((cause: unknown) => {
|
|
70
|
-
ctx.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
// ctx goes stale if the session is replaced or reloaded mid-watch; there is nobody left to tell.
|
|
75
|
+
try {
|
|
76
|
+
ctx.ui.notify(
|
|
77
|
+
`CI watch failed: ${cause instanceof Error ? cause.message : String(cause)}`,
|
|
78
|
+
"error",
|
|
79
|
+
);
|
|
80
|
+
} catch {
|
|
81
|
+
// stale context
|
|
82
|
+
}
|
|
74
83
|
});
|
|
75
84
|
},
|
|
76
85
|
});
|