diff --git a/src/review/gooseReviewer.ts b/src/review/gooseReviewer.ts index 588da2f..4d332f0 100644 --- a/src/review/gooseReviewer.ts +++ b/src/review/gooseReviewer.ts @@ -45,7 +45,10 @@ export class GooseReviewer { input.files.map((file) => file.filename) ); if (warnings.length > 0) { - logger.warn({ warnings }, "Review output contained findings that could not be posted inline."); + logger.warn( + { warnings }, + "Review output contained findings that could not be posted inline." + ); } return decision; }, diff --git a/src/review/processor.ts b/src/review/processor.ts index 0fe8619..8232aa7 100644 --- a/src/review/processor.ts +++ b/src/review/processor.ts @@ -943,7 +943,10 @@ async function maybeMergePullRequest( // A concurrent schedule run or approval event may have merged this head // first. GitHub answers 405 with "was already merged"; treat it as done. if (isAlreadyMergedError(error)) { - logger.info({ owner, repo, pullNumber, headSha: params.headSha }, "Pull request was already merged by a concurrent run."); + logger.info( + { owner, repo, pullNumber, headSha: params.headSha }, + "Pull request was already merged by a concurrent run." + ); return; } throw error; @@ -958,7 +961,10 @@ function isAlreadyMergedError(error: unknown): boolean { if (candidate.status !== 405 && candidate.status !== 409) { return false; } - return typeof candidate.message === "string" && /already.{0,20}merged|Pull Request is not mergeable/i.test(candidate.message); + return ( + typeof candidate.message === "string" && + /already.{0,20}merged|Pull Request is not mergeable/i.test(candidate.message) + ); } async function hasCurrentHeadApprovalFrom( diff --git a/test/diff-position.test.ts b/test/diff-position.test.ts index 73d182f..deff8d2 100644 --- a/test/diff-position.test.ts +++ b/test/diff-position.test.ts @@ -39,9 +39,7 @@ test("toDiffPosition maps valid new lines and rejects stale ones", () => { }); test("hunk headers with ranges are parsed correctly", () => { - const valid = collectValidNewLines([ - file("@@ -10,5 +20,3 @@\n+first\n+second\n+third") - ]); + const valid = collectValidNewLines([file("@@ -10,5 +20,3 @@\n+first\n+second\n+third")]); assert.equal(valid.has("src/a.ts:20"), true); assert.equal(valid.has("src/a.ts:22"), true); assert.equal(valid.has("src/a.ts:23"), false); diff --git a/test/persistent-cache-keys.test.ts b/test/persistent-cache-keys.test.ts index 283e454..1620a9c 100644 --- a/test/persistent-cache-keys.test.ts +++ b/test/persistent-cache-keys.test.ts @@ -8,14 +8,8 @@ import { } from "../src/storage/cacheStore.js"; test("object keys are scoped by repository id, pull number, and optional prefix", () => { - assert.equal( - repositoryKnowledgeObjectKey("123"), - "repositories/123/knowledge/repository.md" - ); - assert.equal( - pullRequestReviewObjectKey("123", 7), - "repositories/123/pulls/7/latest.json" - ); + assert.equal(repositoryKnowledgeObjectKey("123"), "repositories/123/knowledge/repository.md"); + assert.equal(pullRequestReviewObjectKey("123", 7), "repositories/123/pulls/7/latest.json"); assert.equal( pullRequestReviewObjectKey("123", 7, "forum-1"), "forum-1/repositories/123/pulls/7/latest.json" diff --git a/test/repository-knowledge.test.ts b/test/repository-knowledge.test.ts index de3d4cd..df76cb2 100644 --- a/test/repository-knowledge.test.ts +++ b/test/repository-knowledge.test.ts @@ -20,7 +20,10 @@ test("repository knowledge round trips through the agent scratch file", async () // container-facing 0o777/0o666 contract can only be asserted on POSIX. if (process.platform === "win32") { assert.equal((await fs.stat(path.join(root, ".ghbot"))).mode & 0o222, 0o222); - assert.equal((await fs.stat(path.join(root, ".ghbot", "repository-knowledge.md"))).mode & 0o222, 0o222); + assert.equal( + (await fs.stat(path.join(root, ".ghbot", "repository-knowledge.md"))).mode & 0o222, + 0o222 + ); } else { assert.equal((await fs.stat(path.join(root, ".ghbot"))).mode & 0o777, 0o777); assert.equal( diff --git a/test/retry.test.ts b/test/retry.test.ts index 1bb76cd..c7a545d 100644 --- a/test/retry.test.ts +++ b/test/retry.test.ts @@ -52,20 +52,18 @@ test("throws the last error after exhausting attempts", async () => { }, { maxAttempts: 3, baseDelayMs: 1 } ), - /boom 3$/ - ); + /boom 3$/ + ); assert.equal(attempts, 3); }); test("4xx errors are not retried by default", async () => { let attempts = 0; await assert.rejects( - withRetry( - "probe.client-error", - async () => { - attempts += 1; - throw new HttpLikeError(404, "not found"); - }) + withRetry("probe.client-error", async () => { + attempts += 1; + throw new HttpLikeError(404, "not found"); + }) ); assert.equal(attempts, 1); }); diff --git a/test/review-processor.test.ts b/test/review-processor.test.ts index 7c4a12a..410348a 100644 --- a/test/review-processor.test.ts +++ b/test/review-processor.test.ts @@ -54,7 +54,8 @@ test("a clean decision submits a single final APPROVE review", () => { }); test("superseded review bodies keep the original state marker", () => { - const marker = ""; + const marker = + ""; const body = formatSupersededReviewBody({ originalMarker: marker, oldCommitId: "a".repeat(40), diff --git a/test/security-sanitization.test.ts b/test/security-sanitization.test.ts index ba2653f..9a333c7 100644 --- a/test/security-sanitization.test.ts +++ b/test/security-sanitization.test.ts @@ -9,7 +9,14 @@ import { import { containsSecret, redactSecrets } from "../src/security/secrets.js"; test("protected basenames cover env files, agent configs, and deploy configs", () => { - for (const name of [".env", ".env.local", ".ENV", "AGENTS.MD", "opencode.json", "wrangler.toml"]) { + for (const name of [ + ".env", + ".env.local", + ".ENV", + "AGENTS.MD", + "opencode.json", + "wrangler.toml" + ]) { assert.equal(isProtectedBasename(name), true, `${name} should be protected`); } assert.equal(isProtectedBasename("environment.ts"), false);