MCPcopy
hub / github.com/github/awesome-copilot / detect_monorepo

Function detect_monorepo

skills/acquire-codebase-knowledge/scripts/scan.py:374–396  ·  view source on GitHub ↗

Detect monorepo signals.

()

Source from the content-addressed store, hash-verified

372
373
374def detect_monorepo() -> List[str]:
375 """Detect monorepo signals."""
376 signals = []
377
378 for filename in MONOREPO_FILES:
379 if Path(filename).exists():
380 signals.append(f"Monorepo tool detected: {filename}")
381
382 for dirname in MONOREPO_DIRS:
383 if Path(dirname).is_dir():
384 signals.append(f"Sub-package directory found: {dirname}/")
385
386 # Check package.json workspaces
387 if Path("package.json").exists():
388 try:
389 with open("package.json", 'r') as f:
390 content = f.read()
391 if '"workspaces"' in content:
392 signals.append("package.json has 'workspaces' field (npm/yarn workspaces monorepo)")
393 except Exception:
394 pass
395
396 return signals
397
398
399def detect_ci_cd_pipelines() -> List[str]:

Callers 1

mainFunction · 0.85

Calls 1

openFunction · 0.50

Tested by

no test coverage detected