Add check to make sure remote and local release branch are synced
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
- a new pr to replicate https://github.com/sourcegraph/sourcegraph/pull/34200
Solve: https://github.com/sourcegraph/sourcegraph/issues/32783
Test plan
@marsblkm tested locally and manually by doing the following:
- Checkout to branch
3.39and randomly commit something (to simulate the scenario) - Checkout to
main - Merge
jm/check-local-and-remote-release-branchintomain. - Set up dry run mode and execute
yarn release release:create-candidate final