MCPcopy Index your code
hub / github.com/TrainLoop/evals / check_git_status

Function check_git_status

scripts/release.py:339–356  ·  view source on GitHub ↗

Ensure git repo is in a clean state.

()

Source from the content-addressed store, hash-verified

337
338
339def check_git_status():
340 """Ensure git repo is in a clean state."""
341 print("🔍 Checking git status...")
342
343 # Check if we're in a git repo
344 try:
345 run_cmd("git status", capture_output=True)
346 except subprocess.CalledProcessError:
347 sys.exit("❌ Not in a git repository")
348
349 # Check for uncommitted changes
350 status = run_cmd("git status --porcelain", capture_output=True)
351 if status:
352 print("❌ You have uncommitted changes:")
353 print(status)
354 sys.exit("Please commit or stash your changes before releasing")
355
356 print("✅ Git status is clean")
357
358
359def ensure_main_branch():

Callers 1

mainFunction · 0.85

Calls 1

run_cmdFunction · 0.85

Tested by

no test coverage detected