From eafccaad7346d6e1f8d13024bb5295bc683ab046 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Wed, 5 Dec 2018 16:43:29 -0800 Subject: Fix Bitbucket Server import not allowing personal projects Bitbucket Server places personal projects in a namespace called `~username`. This change allows those projects and also strips them from the GitLab namespace. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53419 --- spec/helpers/import_helper_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spec/helpers') diff --git a/spec/helpers/import_helper_spec.rb b/spec/helpers/import_helper_spec.rb index cb0ea4e26ba..af4931e3370 100644 --- a/spec/helpers/import_helper_spec.rb +++ b/spec/helpers/import_helper_spec.rb @@ -2,6 +2,10 @@ require 'rails_helper' describe ImportHelper do describe '#sanitize_project_name' do + it 'removes leading tildes' do + expect(helper.sanitize_project_name('~~root')).to eq('root') + end + it 'removes whitespace' do expect(helper.sanitize_project_name('my test repo')).to eq('my-test-repo') end -- cgit v1.2.3