MCPcopy Create free account
hub / github.com/MigoXLab/coderio / commit

Function commit

src/nodes/validation/commit/index.ts:11–40  ·  view source on GitHub ↗
(options?: GitCommitOptions)

Source from the content-addressed store, hash-verified

9 * Delegates to the commit-agent, passing appPath via instruction.
10 */
11export async function commit(options?: GitCommitOptions): Promise<GitCommitResult> {
12 try {
13 if (!options?.appPath) {
14 throw new Error('commit() requires options.appPath');
15 }
16
17 const appPath = path.resolve(options.appPath);
18 const agent = createCommitAgent();
19
20 const instruction = formatGitCommitInstruction({
21 appPath,
22 iteration: options.iteration,
23 });
24
25 await agent.run(instruction);
26
27 logger.printSuccessLog('Commit completed!');
28 return {
29 success: true,
30 message: 'Commit workflow completed',
31 };
32 } catch (error) {
33 const errorMessage = error instanceof Error ? error.message : String(error);
34 logger.printErrorLog(`Commit failed: ${errorMessage}`);
35 return {
36 success: false,
37 message: errorMessage,
38 };
39 }
40}

Callers 2

runValidationFunction · 0.90
performCommitFunction · 0.90

Calls 2

createCommitAgentFunction · 0.90

Tested by

no test coverage detected