You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: regenerate & commit file changes when updating existing PRs
🐛 **Critical Fix:** Existing PR updates now properly regenerate file content
**Problem:** When updating existing PRs, Buddy Bot only updated PR metadata
(title, body, labels) but didn't regenerate or commit updated file changes
to the branch. This caused wrong dependency versions to persist in the diff.
**Root Cause:** The existing PR update logic skipped the crucial steps:
- generateAllFileUpdates()
- gitProvider.commitChanges()
**Solution:**
- Extract existing branch name from PR (existingPR.head)
- Reset to clean main state before generating updates
- Regenerate file updates with latest dependency versions
- Commit updated changes to existing branch (overwrites old content)
- Update PR metadata last
**Test Coverage:**
- Added test for existing PR file regeneration scenario
- Validates zip/unzip constraint preservation in PR updates
- Ensures no cross-contamination in generated file content
**Impact:**
✅ New PRs: Always worked correctly
✅ Existing PRs: Now work correctly (previously broken)
This fixes the user-reported issue where deleting and recreating PRs
was the only way to get correct dependency versions.
chore: wip
0 commit comments