MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / classify

Function classify

scripts/ci-scope.py:21–31  ·  view source on GitHub ↗
(paths)

Source from the content-addressed store, hash-verified

19
20
21def classify(paths):
22 outputs = dict(go=False, web=True, nix=False, parity=False)
23 for path in paths:
24 if path.startswith(('.github/workflows/', 'scripts/ci-')):
25 return dict.fromkeys(outputs, True)
26 outputs['go'] |= not path.startswith('web/')
27 outputs['parity'] |= path.startswith('web/')
28 outputs['nix'] |= (path.startswith('nix/') or
29 ('/' not in path and fnmatch.fnmatchcase(path, 'flake.*')) or
30 path in NIX_FILES)
31 return outputs
32
33
34def git(*args, cwd=None):

Callers 1

for_eventFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected