Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitbucket URL incorrectly parsed (interpretes scm as part of user) #76

Open
Hi-Fi opened this issue Nov 5, 2021 · 0 comments
Open

Bitbucket URL incorrectly parsed (interpretes scm as part of user) #76

Hi-Fi opened this issue Nov 5, 2021 · 0 comments

Comments

@Hi-Fi
Copy link

Hi-Fi commented Nov 5, 2021

In package.json I have following repo definition (format correct that's provided by Bitbucket DataCenter):

  "repository": {
    "type": "git",
    "url": "https://bb.example.com/scm/project1/repo1.git"
  },

When this is parsed, following is obtained:

npx get-pkg-repo package.json
{
  browse: [Function (anonymous)],
  domain: 'bb.example.com',
  project: 'repo1',
  type: null,
  user: 'scm/project1'
}

Bitbucket uses that scm part only at clone URLs. Cloning without it doesn't work, but also UI URLs with it doesn't work (only special case is that full URL, that goes to repo front page).

Expected

{
  browse: [Function (anonymous)],
  domain: 'bb.example.com',
  project: 'repo1',
  type: null,
  user: 'project1'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant