Skip to content

Commit

Permalink
Backport: Hide given credentials for migrated repos. (#9098)
Browse files Browse the repository at this point in the history
CloneAddr was being used as OriginalURL.
Now passing OriginalURL through from the form and saving it.
  • Loading branch information
aqtrans authored and techknowlogick committed Nov 20, 2019
1 parent 38ce87a commit ade5ec5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion models/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions routers/repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ade5ec5

Please sign in to comment.