vscode-open-in-github icon indicating copy to clipboard operation
vscode-open-in-github copied to clipboard

Generates incorrect baseURL when GitHub username starts with a number

Open jaller94 opened this issue 7 years ago • 4 comments

The generated base URL is incorrect for me:

Steps

  1. git clone [email protected]:7Geese/gutter-django.git
  2. Open VS Code
  3. "Open on GitHub"

Expected

https://github.com/7Geese/gutter-django

Actual

https://github.com:7/git/gutter-django/

jaller94 avatar Jun 19 '18 18:06 jaller94

Might get resolved by updating git-url-parse. The latest release is 9.0.1.

jaller94 avatar Jun 19 '18 19:06 jaller94

hi @jaller94 thank you for your feedback, will have a look asap!

bugthesystem avatar Jun 19 '18 20:06 bugthesystem

@jaller94 I tried with your repo and it worked well with "http url form: "https://github.com/7Geese/gutter-django.git", creates correct url/s for Github but git-url-parse fails (incl the latest version) if the name starts with a number and it assumes it as a port, not an owner. I will open issue for this or will can send fix pr if I find time today, thanks!

bugthesystem avatar Jun 20 '18 08:06 bugthesystem

@jaller94 I created pr for the fix in the package used by the one dependency of the git-url-parse package which I'm using, "node module hell" :)

I'll be updating when package owner updates the package/s.

bugthesystem avatar Jun 20 '18 09:06 bugthesystem