From b051193186fae9aafc1def4c54ec9e9c8a5f2ab7 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 19 Jun 2026 02:40:52 +0000 Subject: [PATCH] fix: make git integration test self-contained for CI The 'fetch+reset path' test called commitAndPush without author args and relied on an ambient git identity. A bare CI runner has none, so 'git commit' failed with 'Author identity unknown'. Pass an explicit author like the sibling tests so the suite is deterministic regardless of runner git config. Co-Authored-By: Claude --- src/git.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/git.test.ts b/src/git.test.ts index 7019fa0..48ac13e 100644 --- a/src/git.test.ts +++ b/src/git.test.ts @@ -45,7 +45,9 @@ test("second sync resets cleanly (fetch+reset path)", async () => { const client = new ChildProcessGitClient({ baseDir: base }); await client.syncClone({ url: bare, branch: "main" }); await client.writeFiles([{ repoPath: "_posts/second.md", data: "x" }]); - await client.commitAndPush({ message: "second", branch: "main" }); + // Pass an explicit author so the test does not depend on an ambient git + // identity (a bare CI runner has none and `git commit` would fail). + await client.commitAndPush({ message: "second", branch: "main", authorName: "t", authorEmail: "t@t" }); const verify = join(root, "verify2"); execFileSync("git", ["clone", bare, verify]); expect(readFileSync(join(verify, "_posts/second.md"), "utf8")).toBe("x");