wordpress-mobile / release-toolkit-gutenberg-mobile

Automation Scripts for Releasing Gutenberg-Mobile Updates to the WordPress Mobile Apps.
Mozilla Public License 2.0
5 stars 2 forks source link

Add prompt logic to handle if branch already exists #210

Closed derekblank closed 4 months ago

derekblank commented 9 months ago

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

To test

  1. Create a release, e.g. go run main.go release prepare all 1.108.0
  2. Once the PR is created and the branch exists on the remote repo, run the same command again
  3. At the prompt, choose either yes (continue) or no (exit)
  4. If yes (continue), the remote branch should be deleted and the script resumes cloning the repo
  5. If no (exit), the script should stop running and the remote branch remains
derekblank commented 4 months ago

@jhnstn Closing this one, we can re-open it or create a new issue if we need to.