From 06963628a9f3d5df9b4e89ccfe779eedfb8e7eac Mon Sep 17 00:00:00 2001 From: Fabian Jocks <24557998+iamfj@users.noreply.github.com> Date: Mon, 15 Jun 2026 22:13:44 +0200 Subject: [PATCH] feat(doctor): detect optional code-review-graph --- src/core/doctor.ts | 1 + tests/doctor.test.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/doctor.ts b/src/core/doctor.ts index 8f70080..483d7ad 100644 --- a/src/core/doctor.ts +++ b/src/core/doctor.ts @@ -33,5 +33,6 @@ export function getDoctorChecks(context: StackOpsContext, path = process.env.PAT { name: "gh", ok: commandExists("gh", path), required: true }, { name: "git", ok: commandExists("git", path), required: true }, { name: "semble", ok: commandExists("semble", path), required: false }, + { name: "code-review-graph", ok: commandExists("code-review-graph", path), required: false }, ]; } diff --git a/tests/doctor.test.ts b/tests/doctor.test.ts index d3a0c99..9027139 100644 --- a/tests/doctor.test.ts +++ b/tests/doctor.test.ts @@ -10,11 +10,13 @@ function tempContext() { } describe("stack-ops doctor", () => { - test("marks semble optional and required checks required", () => { + test("marks optional tools optional and required checks required", () => { const context = tempContext(); const checks = getDoctorChecks(context, ""); - expect(checks.find((check) => check.name === "semble")?.required).toBe(false); + for (const name of ["semble", "code-review-graph"]) { + expect(checks.find((check) => check.name === name)?.required).toBe(false); + } for (const name of ["artifact directory", "state file", "stax", "gh", "git"]) { expect(checks.find((check) => check.name === name)?.required).toBe(true); } @@ -28,6 +30,7 @@ describe("stack-ops doctor", () => { { name: "gh", ok: true, required: true }, { name: "git", ok: true, required: true }, { name: "semble", ok: false, required: false }, + { name: "code-review-graph", ok: false, required: false }, ]; expect(doctorPassed(checks)).toBe(true); @@ -37,6 +40,7 @@ describe("stack-ops doctor", () => { const checks: DoctorCheck[] = [ { name: "stax", ok: false, required: true }, { name: "semble", ok: false, required: false }, + { name: "code-review-graph", ok: false, required: false }, ]; expect(doctorPassed(checks)).toBe(false);