Browse Source

Backport: Hide given credentials for migrated repos. (#9098)

CloneAddr was being used as OriginalURL.
Now passing OriginalURL through from the form and saving it.
tags/v1.10.1
Jordan 5 years ago committed by techknowlogick
parent
commit
ade5ec5aa7
  1. 2
      models/task.go
  2. 1
      routers/repo/repo.go

2
models/task.go

@ -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,

1
routers/repo/repo.go

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

Loading…
Cancel
Save