MCPcopy Create free account
hub / github.com/NateBJones-Projects/OB1 / rootForPath

Function rootForPath

scripts/update-readme-contributions.mjs:47–61  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

45}
46
47function rootForPath(filePath) {
48 const parts = filePath.split("/");
49 const first = parts[0];
50
51 if (
52 ["dashboards", "extensions", "integrations", "primitives", "recipes", "schemas", "skills"].includes(first) &&
53 parts.length >= 2
54 ) {
55 return `${parts[0]}/${parts[1]}/`;
56 }
57
58 if (first === "docs" && parts.length >= 2) return parts.slice(0, 2).join("/");
59 if (first === "server") return "server/index.ts";
60 return filePath;
61}
62
63function titleWords(title) {
64 return title

Callers 1

chooseRepoTargetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…