When running the go run main.go release prepare all x.xx.x command and the branch already exists on the remote repo, the user is prompted if they want to continue. This PR adds the logic to delete the remote branch and continue cloning:
PR Changes
Adds DeleteBranch GitHub interface
When running prepare, moves git.Clone commands outside of the else statement to continue the automation (and for DRY-ness)
To test
Create a release, e.g. go run main.go release prepare all 1.108.0
Once the PR is created and the branch exists on the remote repo, run the same command again
At the prompt, choose either yes (continue) or no (exit)
If yes (continue), the remote branch should be deleted and the script resumes cloning the repo
If no (exit), the script should stop running and the remote branch remains
Resolves:
When running the
go run main.go release prepare all x.xx.x
command and the branch already exists on the remote repo, the user is prompted if they want to continue. This PR adds the logic to delete the remote branch and continue cloning:PR Changes
DeleteBranch
GitHub interfaceprepare
, movesgit.Clone
commands outside of theelse
statement to continue the automation (and for DRY-ness)To test
go run main.go release prepare all 1.108.0