InditexTech / gh-sherpa

Streamline branch and pull request creation for Jira or GitHub issues from command line
Apache License 2.0
48 stars 2 forks source link

Warns about duplicated branches but that's not the case #71

Closed spanishkangaroo closed 4 months ago

spanishkangaroo commented 5 months ago

Detailed description

When running the create pr command a second time, it warns that the branch already exists, even when I indicated a different branch name and that's not the case. See example below with "The remote branch already exists, skipping creation...":

➜  app-app1 git:(documentation/GH-199-test-docs) gh sherpa cpr -i 199              

=> Running create-pr command in Sherpa.

WARNING: there is already a local branch named documentation/GH-199-test-docs for this issue
? Do you want to use this branch to create the pull request No
? Label 'kind/documentation' found. What type of branch name do you want to create? documentation
? Please, write one additional description (optional). Truncate to 22 chars: test-docs-2

A new pull request is going to be created from documentation/GH-199-test-docs-2 to main branch
? Do you want to continue? Yes
The remote branch already exists, skipping creation...

The pull request https://github.com/inditex/app-app1/pull/201 have been created!
You are now working on the branch documentation/GH-199-test-docs-2

Expected behaviour

Do not warn, as the branch does not exist.

jorgegarciarey commented 4 months ago

@spanishkangaroo , we're going to release a new version in a few days with this fix and some additional features.