]> source.dussan.org Git - gitea.git/commitdiff
Hide given credentials for migrated repos. (#9097)
authorJordan <eatsleepgame@gmail.com>
Wed, 20 Nov 2019 18:01:09 +0000 (12:01 -0600)
committertechknowlogick <techknowlogick@gitea.io>
Wed, 20 Nov 2019 18:01:09 +0000 (13:01 -0500)
CloneAddr was being saved as OriginalURL.

Now passing OriginalURL through from the form and
saving it in it's place

models/task.go
routers/repo/repo.go

index cb878d387c12b33ff47862611d9aa692d231e7fe..763644e039291bd8781eb8f8f861ed375754466b 100644 (file)
@@ -196,7 +196,7 @@ func CreateMigrateTask(doer, u *User, opts base.MigrateOptions) (*Task, error) {
        repo, err := CreateRepository(doer, u, CreateRepoOptions{
                Name:        opts.RepoName,
                Description: opts.Description,
-               OriginalURL: opts.CloneAddr,
+               OriginalURL: opts.OriginalURL,
                IsPrivate:   opts.Private,
                IsMirror:    opts.Mirror,
                Status:      RepositoryBeingMigrated,
index b78dd5376ee070a400ad82a4c7cdee79a7fbf448..e4bc6d2443258f98935ff7c23972bff71d2c7f29 100644 (file)
@@ -326,6 +326,7 @@ func MigratePost(ctx *context.Context, form auth.MigrateRepoForm) {
        }
 
        var opts = migrations.MigrateOptions{
+               OriginalURL:  form.CloneAddr,
                CloneAddr:    remoteAddr,
                RepoName:     form.RepoName,
                Description:  form.Description,