Skip to content

Align BitBucket Server import name validation criteria with GitLab

Overview

All importers (GitLab , Bitbucket, GitHub) have some sort of name validation.

In case of BitBucket the criteria does not align with GitLab and is more strict.

While GitLab has the following requirements

Name can contain only letters, digits, emojis, '_', '.', dash, space. It must start with letter, digit, emoji or '_'.

BitBucket requests that

Path can contain only letters, digits, _, - and .. Cannot start with -, end in .git or end in .atom

So in case a BitBucket repo has the following details:

    {
      "slug": "test-repo",
      "id": 1,
      "name": "test repo",

The import will fail because of a "space" in test repo with error

{"severity":"ERROR","time":"2021-03-16T16:55:00.596Z","correlation_id":"01F0XZCJP40XM2ZZGMJJCY2W8A","message":"Import failed due to a BitBucket Server error","error":"Path can contain only letters, digits, '_', '-' and '.'. Cannot start with '-', end in '.git' or end in '.atom'"}

PS Check how the Bitbucket Cloud importer is behaving as well.

Edited by Kassio Borges