1
0
Fork 0
forked from forgejo/forgejo

Add owner_name column for table repository for maintaince reason (#9717)

* Add owner_name column for table repository for maintaince reason

* refactor

* Fix tests

* fix test

* fix bug when fork repository

Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
Lunny Xiao 2020-01-12 17:36:21 +08:00 committed by GitHub
parent 65baacf227
commit 5765212c6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 129 additions and 102 deletions

View file

@ -256,7 +256,7 @@ func RedirectToRepo(ctx *Context, redirectRepoID int64) {
redirectPath := strings.Replace(
ctx.Req.URL.Path,
fmt.Sprintf("%s/%s", ownerName, previousRepoName),
fmt.Sprintf("%s/%s", repo.MustOwnerName(), repo.Name),
repo.FullName(),
1,
)
if ctx.Req.URL.RawQuery != "" {