MCPcopy Create free account
hub / github.com/cloudflare/computer / commitFile

Function commitFile

packages/computer/src/git/diff.test.ts:33–37  ·  view source on GitHub ↗
(path: string, content: string, message: string)

Source from the content-addressed store, hash-verified

31}
32
33async function commitFile(path: string, content: string, message: string): Promise<string> {
34 await memfs.promises.writeFile(`${DIR}/${path}`, content);
35 await git.add({ fs: memfs, dir: DIR, filepath: path });
36 return git.commit({ fs: memfs, dir: DIR, message, author: AUTHOR });
37}
38
39async function runDiff(opts: { ref?: string } = {}): Promise<string> {
40 return diffWith({

Callers 1

diff.test.tsFile · 0.85

Calls 3

writeFileMethod · 0.65
addMethod · 0.65
commitMethod · 0.65

Tested by

no test coverage detected