Skip to content

Commit 1615b3c

Browse files
aqtranstechknowlogick
authored andcommitted
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
1 parent 2ab8c78 commit 1615b3c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

models/task.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ func CreateMigrateTask(doer, u *User, opts base.MigrateOptions) (*Task, error) {
196196
repo, err := CreateRepository(doer, u, CreateRepoOptions{
197197
Name: opts.RepoName,
198198
Description: opts.Description,
199-
OriginalURL: opts.CloneAddr,
199+
OriginalURL: opts.OriginalURL,
200200
IsPrivate: opts.Private,
201201
IsMirror: opts.Mirror,
202202
Status: RepositoryBeingMigrated,

routers/repo/repo.go

+1
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ func MigratePost(ctx *context.Context, form auth.MigrateRepoForm) {
326326
}
327327

328328
var opts = migrations.MigrateOptions{
329+
OriginalURL: form.CloneAddr,
329330
CloneAddr: remoteAddr,
330331
RepoName: form.RepoName,
331332
Description: form.Description,

0 commit comments

Comments
 (0)