Closed HebaruSan closed 1 year ago
Huh, that just didn't work at all. It was supposed to push more commits and add a comment:
KSP-CKAN/NetKAN#9580
Not even an exception to investigate.
I checked the repo.get_pulls(head=...
syntax in a Python REPL, and it works flawlessly.
Problem
I let KSP-CKAN/NetKAN#9471 sit without review for quite a while, and in the meantime we had 9 weekly checks go by without any new commits pushed. Probably quite a few abandoned mods have slipped through the cracks, which we should probably catch up at some point.
Cause
The branch checkout logic in the AutoFreezer was trying to re-use an existing branch if there was one, but it was missing a step: it fetched the remote branch, and it tried to check it out, but it never created a local branch corresponding to the remote branch. So checking it out failed, and it always fell back to creating a new branch. Then later the attempt to push to the server would fail because the branch already existed with conflicts.
Changes
NetkanRepo.change_branch
function instead of rolling its own version of that logic, which will fix the problem and reduce code duplicationThis way if we miss a week of review, the next week's idle mods will get cleanly added on to the existing PR, and none will be missed.
Note that this branch shares the test-fixes commit with #280, but not the one with that PR's actual functionality. I think we can merge either one first or not at all and the other one should be fine to continue or not.