From aa5821e571620e09229721a1a235d93a554db6a3 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Wed, 1 Aug 2018 10:44:45 -0700 Subject: Assorted Bitbucket Server importer code cleanup based on review --- app/controllers/import/bitbucket_server_controller.rb | 2 +- app/views/import/bitbucket_server/status.html.haml | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'app') diff --git a/app/controllers/import/bitbucket_server_controller.rb b/app/controllers/import/bitbucket_server_controller.rb index 7495364fac9..798daeca6c9 100644 --- a/app/controllers/import/bitbucket_server_controller.rb +++ b/app/controllers/import/bitbucket_server_controller.rb @@ -13,7 +13,7 @@ class Import::BitbucketServerController < Import::BaseController # Repository names are limited to 128 characters. They must start with a # letter or number and may contain spaces, hyphens, underscores, and periods. # (https://community.atlassian.com/t5/Answers-Developer-Questions/stash-repository-names/qaq-p/499054) - VALID_BITBUCKET_CHARS = /\A[a-zA-z0-9\-_\.\s]+\z/ + VALID_BITBUCKET_CHARS = /\A[\w\-_\.\s]+\z/ def new end diff --git a/app/views/import/bitbucket_server/status.html.haml b/app/views/import/bitbucket_server/status.html.haml index d88c0e0a337..e8cae582811 100644 --- a/app/views/import/bitbucket_server/status.html.haml +++ b/app/views/import/bitbucket_server/status.html.haml @@ -41,12 +41,9 @@ = link_to project.full_path, [project.namespace.becomes(Namespace), project] %td.job-status - if project.import_status == 'finished' - %span - %i.fa.fa-check - Done + = icon('check', text: 'Done') - elsif project.import_status == 'started' - %i.fa.fa-spinner.fa-spin - started + = icon('spin', text: 'started') - else = project.human_import_status_name -- cgit v1.2.1