mirror of
https://github.com/backnotprop/plannotator.git
synced 2026-09-14 14:17:26 +08:00
0e1ea9e363
gh pr diff computes diffs against the merge-base (common ancestor), but file contents were fetched at baseSha (base branch tip). When the base branch has moved since the branch point, line counts don't match the diff hunks, causing iterateOverDiff trailing context mismatch crashes. Fetch the merge-base SHA via GitHub's compare API and use it for old file contents. Added try/catch around processFile as a safety net. Fixed in both Bun and Pi servers. For provenance purposes, this commit was AI assisted.