(rootDir: string, repoName: string)
| 12 | import { ProjectService, type CloneEvent } from "./projectService"; |
| 13 | |
| 14 | async function createLocalGitRepository(rootDir: string, repoName: string): Promise<string> { |
| 15 | const repoPath = path.join(rootDir, repoName); |
| 16 | await fs.mkdir(repoPath, { recursive: true }); |
| 17 | await fs.writeFile(path.join(repoPath, "README.md"), "# test\n", "utf-8"); |
| 18 | |
| 19 | execSync("git init -b main", { cwd: repoPath, stdio: "ignore" }); |
| 20 | execSync("git add README.md", { cwd: repoPath, stdio: "ignore" }); |
| 21 | execSync('git -c user.name="test" -c user.email="test@test" commit -m "initial"', { |
| 22 | cwd: repoPath, |
| 23 | stdio: "ignore", |
| 24 | }); |
| 25 | |
| 26 | return repoPath; |
| 27 | } |
| 28 | |
| 29 | const ARCHIVED_AT = "2026-01-01T00:00:00.000Z"; |
| 30 |
no test coverage detected