Browse Source

Hide given credentials for migrated repos. (#9097)

CloneAddr was being saved as OriginalURL.

Now passing OriginalURL through from the form and
saving it in it's place
for-closed-social
Jordan 5 years ago
committed by techknowlogick
parent
commit
1615b3c187
2 changed files with 2 additions and 1 deletions
  1. +1
    -1
      models/task.go
  2. +1
    -0
      routers/repo/repo.go

+ 1
- 1
models/task.go View File

@ -196,7 +196,7 @@ func CreateMigrateTask(doer, u *User, opts base.MigrateOptions) (*Task, error) {
repo, err := CreateRepository(doer, u, CreateRepoOptions{ repo, err := CreateRepository(doer, u, CreateRepoOptions{
Name: opts.RepoName, Name: opts.RepoName,
Description: opts.Description, Description: opts.Description,
OriginalURL: opts.CloneAddr,
OriginalURL: opts.OriginalURL,
IsPrivate: opts.Private, IsPrivate: opts.Private,
IsMirror: opts.Mirror, IsMirror: opts.Mirror,
Status: RepositoryBeingMigrated, Status: RepositoryBeingMigrated,

+ 1
- 0
routers/repo/repo.go View File

@ -326,6 +326,7 @@ func MigratePost(ctx *context.Context, form auth.MigrateRepoForm) {
} }
var opts = migrations.MigrateOptions{ var opts = migrations.MigrateOptions{
OriginalURL: form.CloneAddr,
CloneAddr: remoteAddr, CloneAddr: remoteAddr,
RepoName: form.RepoName, RepoName: form.RepoName,
Description: form.Description, Description: form.Description,

Loading…
Cancel
Save