summaryrefslogtreecommitdiffstats
path: root/routers/api
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-01-10 23:35:17 +0800
committerGitHub <noreply@github.com>2020-01-10 23:35:17 +0800
commit7a3a90aca3c4a8258805efa10022a81e4d1a4d73 (patch)
tree54d92bac08a2aa336825cd1545dcd19fba028c96 /routers/api
parent3143bb10da25cd66383c23aff7b31dbd7c3dd9d6 (diff)
downloadgitea-7a3a90aca3c4a8258805efa10022a81e4d1a4d73.tar.gz
gitea-7a3a90aca3c4a8258805efa10022a81e4d1a4d73.zip
Fix wrong original git service type on a migrated repository (#9693)
Diffstat (limited to 'routers/api')
-rw-r--r--routers/api/v1/repo/repo.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index ae834beadf..0dc0b1a72a 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -485,12 +485,13 @@ func Migrate(ctx *context.APIContext, form auth.MigrateRepoForm) {
}
repo, err := models.CreateRepository(ctx.User, ctxUser, models.CreateRepoOptions{
- Name: opts.RepoName,
- Description: opts.Description,
- OriginalURL: form.CloneAddr,
- IsPrivate: opts.Private,
- IsMirror: opts.Mirror,
- Status: models.RepositoryBeingMigrated,
+ Name: opts.RepoName,
+ Description: opts.Description,
+ OriginalURL: form.CloneAddr,
+ GitServiceType: gitServiceType,
+ IsPrivate: opts.Private,
+ IsMirror: opts.Mirror,
+ Status: models.RepositoryBeingMigrated,
})
if err != nil {
handleMigrateError(ctx, ctxUser, remoteAddr, err)