Skip to content

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

@Hi-Fi

Description

@Hi-Fi

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'
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions