git-for-windows / git-for-windows-automation

A few GitHub workflows and support code to help with Git for Windows' day-to-day tasks
10 stars 9 forks source link

release-git: handle missing `release` branch gracefully #50

Closed dscho closed 1 year ago

dscho commented 1 year ago

We already have code to fast-forward a release branch that is not up to date.

By mistake, I deleted the release branch, however: the repository settings are such that merging a PR deletes its "head" branch, and I had merged the release branch into the main branch. Deleting the branch broke the logic to fast-forward release.

Let's handle missing release branches the same as out-of-date branches, and try to push the current main to the release branch.