MCPcopy Index your code
hub / github.com/sourcebot-dev/sourcebot / createTempRepo

Function createTempRepo

packages/backend/src/git.test.ts:23–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21};
22
23const createTempRepo = async () => {
24 const repoPath = await mkdtemp(join(tmpdir(), "sourcebot-git-test-"));
25
26 runGit(repoPath, ["init", "--initial-branch=main"]);
27 runGit(repoPath, ["config", "user.name", "Sourcebot Test"]);
28 runGit(repoPath, ["config", "user.email", "sourcebot@example.com"]);
29 runGit(repoPath, ["config", "tag.sort", "refname"]);
30 runGit(repoPath, ["config", "branch.sort", "refname"]);
31
32 return repoPath;
33};
34
35const commitFile = async ({
36 repoPath,

Callers 1

git.test.tsFile · 0.85

Calls 1

runGitFunction · 0.85

Tested by

no test coverage detected