MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / isMeaningfulOrphan

Function isMeaningfulOrphan

website/src/lib/pr-insights.ts:85–95  ·  view source on GitHub ↗
(node: PRNode, links: PRLink[])

Source from the content-addressed store, hash-verified

83}
84
85function isMeaningfulOrphan(node: PRNode, links: PRLink[]): boolean {
86 if (!node.isOrphan) return false;
87 if (node.status === "added") return false;
88 if (node.prZone === "primary" || node.prZone === "secondary") return false;
89 if (node.type === "Variable") return false;
90 if (node.name.startsWith("test_")) return false;
91 const hasOutgoing = links.some(
92 (l) => (typeof l.source === "object" ? (l.source as any).id : l.source) === node.id
93 );
94 return !hasOutgoing;
95}
96
97export function computePRInsights(data: PRGraphData): PRInsights {
98 const nodes = data.nodes || [];

Callers 1

computePRInsightsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected