summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-01-21 20:33:58 +0100
committerGitHub <noreply@github.com>2021-01-21 20:33:58 +0100
commit81c833d92d04e0a5579e7168aba548dad7e17451 (patch)
treec928f1b43fc6e2f27603193f0eed657f0760c96d /routers
parentb5570d3e680570343c1552bfc972b19b161209cd (diff)
downloadgitea-81c833d92d04e0a5579e7168aba548dad7e17451.tar.gz
gitea-81c833d92d04e0a5579e7168aba548dad7e17451.zip
Add support to migrate from gogs (#14342)
Add support to migrate gogs: * issues * comments * labels * milestones * wiki Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'routers')
-rw-r--r--routers/api/v1/repo/migrate.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/api/v1/repo/migrate.go b/routers/api/v1/repo/migrate.go
index f07599399c..0b829c9dfb 100644
--- a/routers/api/v1/repo/migrate.go
+++ b/routers/api/v1/repo/migrate.go
@@ -18,6 +18,7 @@ import (
"code.gitea.io/gitea/modules/graceful"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/migrations"
+ "code.gitea.io/gitea/modules/migrations/base"
"code.gitea.io/gitea/modules/notification"
repo_module "code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/setting"
@@ -217,6 +218,8 @@ func handleMigrateError(ctx *context.APIContext, repoOwner *models.User, remoteA
ctx.Error(http.StatusUnprocessableEntity, "", fmt.Sprintf("The pattern '%s' is not allowed in a username.", err.(models.ErrNamePatternNotAllowed).Pattern))
case models.IsErrMigrationNotAllowed(err):
ctx.Error(http.StatusUnprocessableEntity, "", err)
+ case base.IsErrNotSupported(err):
+ ctx.Error(http.StatusUnprocessableEntity, "", err)
default:
err = util.URLSanitizedError(err, remoteAddr)
if strings.Contains(err.Error(), "Authentication failed") ||