MCPcopy Create free account
hub / github.com/Silentely/eSIM-Tools / getRelatedFiles

Function getRelatedFiles

scripts/pre-push-check.js:55–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53}
54
55function getRelatedFiles() {
56 const range = getDiffRange();
57 if (!range) {
58 return [];
59 }
60
61 const output = runGit([
62 'diff',
63 '--name-only',
64 '--diff-filter=ACMR',
65 '-z',
66 range
67 ]);
68 const files = output.split('\0').filter(Boolean);
69
70 return files.filter(file => {
71 const lowerFile = file.toLowerCase();
72 for (const ext of RELATED_EXTENSIONS) {
73 if (lowerFile.endsWith(ext)) {
74 return true;
75 }
76 }
77 return false;
78 });
79}
80
81function getTouchedProtectedFiles() {
82 if (PROTECTED_FILES.length === 0) return [];

Callers 1

buildStepsFunction · 0.85

Calls 2

getDiffRangeFunction · 0.85
runGitFunction · 0.85

Tested by

no test coverage detected