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

Function first_file_matching

skills/quality-playbook/quality_gate.py:591–598  ·  view source on GitHub ↗

Return first matching path or None.

(directory, patterns)

Source from the content-addressed store, hash-verified

589
590
591def first_file_matching(directory, patterns):
592 """Return first matching path or None."""
593 if not directory.is_dir():
594 return None
595 for pat in patterns:
596 for p in directory.glob(pat):
597 return p
598 return None
599
600
601def file_contains(path, pattern):

Callers 3

check_tdd_logsFunction · 0.85
check_patchesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected