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

@ -1,4 +1,5 @@
// Copyright 2015 The Gogs Authors. All rights reserved.
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
@ -13,7 +14,7 @@ import (
// WikiCloneLink returns clone URLs of repository wiki.
func (repo *Repository) WikiCloneLink() *CloneLink {
return repo.cloneLink(x, true)
return repo.cloneLink(true)
}
// WikiPath returns wiki data path by given user and repository name.
@ -23,7 +24,7 @@ func WikiPath(userName, repoName string) string {
// WikiPath returns wiki data path for given repository.
func (repo *Repository) WikiPath() string {
return WikiPath(repo.MustOwnerName(), repo.Name)
return WikiPath(repo.OwnerName, repo.Name)
}
// HasWiki returns true if repository has wiki.