Add check for release branch to make sure local branch is synced with remote
Created by: marsblkm
- move branch check function to
ensureBranchUpToDate()
to make sure it can be done on any branch - accomodate existing
ensureMainBranchUpToDate()
- make sure release branch can be checked as well
Solve: https://github.com/sourcegraph/sourcegraph/issues/32783
Test plan
@marsblkm tested locally and manually by doing the following:
- Checkout to branch
3.39
and randomly commit something (to simulate the scenario) - Checkout to
main
- Merge
jm/check-local-and-remote-release-branch
intomain
. - Set up dry run mode and execute
yarn release release:create-candidate final