MCPcopy Create free account
hub / github.com/RASAAS/docmcp-knowledge / commit_files

Function commit_files

scripts/generate_content_pr.py:384–396  ·  view source on GitHub ↗

Stage and commit a list of files.

(files: list[Path], message: str)

Source from the content-addressed store, hash-verified

382
383
384def commit_files(files: list[Path], message: str) -> bool:
385 """Stage and commit a list of files."""
386 for f in files:
387 code, _, err = run_git(["add", str(f)])
388 if code != 0:
389 print(f"ERROR: Failed to stage {f}: {err}")
390 return False
391
392 code, _, err = run_git(["commit", "-m", message])
393 if code != 0:
394 print(f"ERROR: Failed to commit: {err}")
395 return False
396 return True
397
398
399def push_branch(branch_name: str) -> bool:

Callers 1

process_updatesFunction · 0.85

Calls 1

run_gitFunction · 0.85

Tested by

no test coverage detected