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

Function diffAddsOrRemovesSymbol

website/src/lib/pr-insights.ts:42–45  ·  view source on GitHub ↗
(diff: string, name: string, kind: "def" | "class")

Source from the content-addressed store, hash-verified

40}
41
42function diffAddsOrRemovesSymbol(diff: string, name: string, kind: "def" | "class"): boolean {
43 const pattern = new RegExp(`^[+-]${kind}\\s+${name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\s*[(:]`, "m");
44 return pattern.test(diff);
45}
46
47function hasAnchorBodyEdit(diff: string): boolean {
48 const lines = diff.split("\n").slice(1);

Callers 1

isLikelyNoiseNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected