通过url导入仓库有个bug
Summary
使用url导入项目时,如果有任何错误(包括密码错误,用户错误,url不对等各种),在点击了”创建项目"的按钮之后,”创建项目“的按钮就会变成灰色,然后整个页面卡住,也不会向后端发送请求。

页面上只能看到一条There is not a valid Git repository at this URL. If your HTTP repository is not publicly accessible, verify your credentials.的提醒,但是这个提醒没有太大意义。
通过检查日志只能查看到/import/url/validate的请求日志返回200,无论对url的验证是成功还是失败都看不到其它的信息,比如具体的原因之类的。
我觉得正常的逻辑应该是:当某一项有错误时,点击完”创建项目“的按钮之后,应该抛出对于的错误原因,然后让用户可以重新输入信息,而不是直接让整个页面卡死。
Steps to reproduce
在gitlab实例中使用url导入项目,依次点击:New project > Import project > Repo by URL,然后输入一个有错的仓库(包括密码错误,用户错误,url不对等各种错误)。
Example Project
What is the current bug behavior?
当通过url导入仓库是有包括密码错误,用户错误,url不对等各种错误中任意一种时,点击”创建项目”按钮之后,按钮会变成灰色,然后整个页面卡住,并且不会抛出正常的错误原因。
What is the expected correct behavior?
当导入仓库的信息有错误时,能够抛出对应的正确的错误信息,让用户能够快速定位到错误的原因,比如具体是密码错误,url错误还是重定向错误等…… 抛出错误信息之后,能够让用户修改信息并重新点击创建项目,而不是直接卡死整个页面让用户无法操作。
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)(we will only investigate if the tests are passing)