MCPcopy Create free account
hub / github.com/cloudflare/agents / commit

Function commit

packages/shell/src/git/index.ts:165–177  ·  view source on GitHub ↗

git commit -m --author " "

(opts: { message: string; author?: GitAuthor; dir?: string })

Source from the content-addressed store, hash-verified

163
164 /** git commit -m <message> --author "<name> <email>" */
165 async commit(opts: { message: string; author?: GitAuthor; dir?: string }) {
166 const author = opts.author ?? {
167 name: "Think Agent",
168 email: "think@cloudflare.dev"
169 };
170 const oid = await git.commit({
171 fs,
172 dir: resolveDir(opts.dir),
173 message: opts.message,
174 author
175 });
176 return { oid, message: opts.message };
177 },
178
179 /** git log [--depth N] [--ref <ref>] */
180 async log(opts?: { depth?: number; ref?: string; dir?: string }) {

Callers

nothing calls this directly

Calls 2

resolveDirFunction · 0.85
commitMethod · 0.80

Tested by

no test coverage detected