refactor: dedupe record guards

This commit is contained in:
Peter Steinberger
2026-04-07 04:21:14 +01:00
parent 59eb291c6e
commit b7be963501
6 changed files with 16 additions and 26 deletions

View File

@@ -2,6 +2,7 @@ import { execFileSync } from "node:child_process";
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
import { homedir } from "node:os";
import { dirname, join } from "node:path";
import { isRecord } from "../src/utils.js";
function writeStdoutLine(message = ""): void {
process.stdout.write(`${message}\n`);
@@ -546,10 +547,6 @@ function extractResponseText(payload: OpenAIResponse): string {
return chunks.join("\n").trim();
}
function isRecord(value: unknown): value is Record<string, unknown> {
return typeof value === "object" && value !== null;
}
function fallbackCategory(issueText: string): "bug" | "enhancement" {
const lower = issueText.toLowerCase();
const bugSignals = [