@harborppm/cli 0.40.0 → 0.41.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/lib/cli.mjs +6 -1
- package/lib/format.mjs +4 -4
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -1686,7 +1686,12 @@ export async function run(argv, io = {}) {
|
|
|
1686
1686
|
: `Added your answer (${r.answered.yourAnswers} so far).`,
|
|
1687
1687
|
);
|
|
1688
1688
|
}
|
|
1689
|
-
return call(
|
|
1689
|
+
return call(
|
|
1690
|
+
"get_premortem",
|
|
1691
|
+
{ harbor, project },
|
|
1692
|
+
(r) => premortemText(r, project),
|
|
1693
|
+
premortemForTerminal,
|
|
1694
|
+
);
|
|
1690
1695
|
}
|
|
1691
1696
|
case "limit": {
|
|
1692
1697
|
const { positionals, harbor } = parse(spec());
|
package/lib/format.mjs
CHANGED
|
@@ -330,10 +330,10 @@ export function forecastData(r) {
|
|
|
330
330
|
return { projects: r.projects.filter((p) => p.health !== "done").map(one) };
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
-
/** A project's pre-mortem, as get_premortem answers it. */
|
|
334
|
-
export function premortemText(r) {
|
|
333
|
+
/** A project's pre-mortem, as get_premortem answers it. The commands it suggests name the project as it was typed (a key or id when its name is shared). */
|
|
334
|
+
export function premortemText(r, project = r.project) {
|
|
335
335
|
if (!r.running) {
|
|
336
|
-
return `No pre-mortem on ${r.project} yet. Start one with harbor premortem "${
|
|
336
|
+
return `No pre-mortem on ${r.project} yet. Start one with harbor premortem "${project}" --start.`;
|
|
337
337
|
}
|
|
338
338
|
const count = `${r.answerCount} answer${r.answerCount === 1 ? "" : "s"}`;
|
|
339
339
|
const head = [`Pre-mortem · ${r.project} · ${count}`, r.question];
|
|
@@ -354,7 +354,7 @@ export function premortemText(r) {
|
|
|
354
354
|
return ` ${a.yours ? "*" : "-"} ${a.answer}${after}`;
|
|
355
355
|
});
|
|
356
356
|
if (!lines.length)
|
|
357
|
-
lines.push(` Nothing yet. Add one: harbor premortem "${
|
|
357
|
+
lines.push(` Nothing yet. Add one: harbor premortem "${project}" "WHAT WENT WRONG"`);
|
|
358
358
|
return [...head, "", ...lines].join("\n");
|
|
359
359
|
}
|
|
360
360
|
|