Skip to content

Commit ade5ec5

Browse files
aqtranstechknowlogick
authored andcommitted
Backport: Hide given credentials for migrated repos. (#9098)
CloneAddr was being used as OriginalURL. Now passing OriginalURL through from the form and saving it.
1 parent 38ce87a commit ade5ec5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

models/task.go

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ func MigratePost(ctx *context.Context, form auth.MigrateRepoForm) {
291291
}
292292

293293
var opts = migrations.MigrateOptions{
294+
OriginalURL: form.CloneAddr,
294295
CloneAddr: remoteAddr,
295296
RepoName: form.RepoName,
296297
Description: form.Description,

0 commit comments

Comments
 (0)