diff options
Diffstat (limited to 'routers/api/v1/repo.go')
-rw-r--r-- | routers/api/v1/repo.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/routers/api/v1/repo.go b/routers/api/v1/repo.go index 712655bf40..5a00267778 100644 --- a/routers/api/v1/repo.go +++ b/routers/api/v1/repo.go @@ -237,7 +237,13 @@ func MigrateRepo(ctx *middleware.Context, form auth.MigrateRepoForm) { return } - repo, err := models.MigrateRepository(ctxUser, form.RepoName, form.Description, form.Private, form.Mirror, remoteAddr) + repo, err := models.MigrateRepository(ctxUser, models.MigrateRepoOptions{ + Name: form.RepoName, + Description: form.Description, + IsPrivate: form.Private || setting.Repository.ForcePrivate, + IsMirror: form.Mirror, + RemoteAddr: remoteAddr, + }) if err != nil { if repo != nil { if errDelete := models.DeleteRepository(ctxUser.Id, repo.ID); errDelete != nil { |