Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ephelsa
Copy link

@ephelsa ephelsa commented Oct 21, 2020

Summary

closes #2243

Details

If you try to Continue in browser using the command gh pr create and your branch's name is like branch/#123, is opened a bad url in browser mixing the path with query params like title and displaying an unexpected prompt message.

Example:
https://github.com/ephelsa/SOME-REPO/compare/master...branch/?title=branch%2F%23123#123?expand=1
Prompt message: Opening github.com/ephelsa/SOME-REPO/compare/master...branch/ in your browser.

After the solution:
https://github.com/ephelsa/SOME-REPO/compare/master...branch%2F%23123?expand=1&title=branch%2F%23123
Prompt message: Opening github.com/ephelsa/SOME-REPO/compare/master...branch/#123 in your browser.

Copy link
Author

@ephelsa ephelsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prettier 👑

Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

I've pushed an update to replace the test with a more narrowly scoped one that just exercises generateCompareURL directly.

@mislav mislav merged commit 744d983 into cli:trunk Oct 21, 2020
@ephelsa ephelsa deleted the fix-continue-browser-for-branch-slash-names branch October 21, 2020 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't continue in the browser for branch names with a slash

2 participants