MCPcopy
hub / github.com/larksuite/cli / isLowRiskPath

Function isLowRiskPath

scripts/pr-labels/index.js:257–267  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

255}
256
257function isLowRiskPath(filePath) {
258 const normalized = normalizePath(filePath);
259 const basename = path.posix.basename(normalized);
260
261 if (normalized.startsWith("skills/lark-")) return false;
262 if (DOC_SUFFIXES.some((suffix) => normalized.endsWith(suffix))) return true;
263 if (LOW_RISK_FILENAMES.has(basename)) return true;
264 if (LOW_RISK_PREFIXES.some((prefix) => normalized.startsWith(prefix))) return true;
265 if (LOW_RISK_TEST_SUFFIXES.some((suffix) => normalized.endsWith(suffix))) return true;
266 return normalized.includes("/testdata/");
267}
268
269function isBusinessSkillPath(filePath) {
270 const normalized = normalizePath(filePath);

Callers 1

classifyPrFunction · 0.85

Calls 1

normalizePathFunction · 0.85

Tested by

no test coverage detected