Skip to content

Bitbucket Server fails when url = https://DOMAIN/stash/scm/PROJECT/REPO.git #901

@jaklan

Description

@jaklan
  • GitLens Version: 10.1.2
  • VSCode Version: 1.40.0
  • OS Version: MacOs Mojave (10.14.6)

Steps to Reproduce:

  1. Use Bitbucket Server with such a remote:
    https://DOMAIN/stash/scm/PROJECT/REPO.git
    The most important part is additional /stash in the URL.
  2. Function baseUrl() in bitbucket-server.ts fails, because this.path.startsWith('scm/') is not true and invoked this.splitPath() results in project = "stash" & repo = "scm/PROJECT/REPO".
  3. Such a behaviour also make it impossible to create a proper custom URL, because you also get wrong tokens: ${repoBase} = stash, ${repo} = stash/scm/PROJECT/REPO and ${repoPath} = scm/PROJECT/REPO. Due to that you're not able to reproduce https://DOMAIN/stash/projects/PROJECT/repos/REPO/browse in any way.

You can try to create a custom Bitbucket Server config and put /stash or /stash/ in the domain field, but it just doesn't work - config is not taken into account when running e.g. Open Repository on Remote, so I assume using slashes in the domain field is not possible.

Potential solution:

Just make it possible to set DOMAIN/stash in the domain field in a Remote configuration or change this.path.startsWith('scm/') line to be also true when any string occurs before scm (and change this.path.replace('scm/', '') similarly).

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions