diff --git a/models/repo.go b/models/repo.go index 025c23f11..bc006f25f 100644 --- a/models/repo.go +++ b/models/repo.go @@ -295,7 +295,7 @@ func (repo *Repository) APIFormat(permission *api.Permission) *api.Repository { Empty: repo.IsBare, Size: int(repo.Size/1024), Fork: repo.IsFork, - Parent: repo.BaseRepo, + Parent: repo.BaseRepo.APIFormat(), Mirror: repo.IsMirror, HTMLURL: repo.HTMLURL(), SSHURL: cloneLink.SSH, diff --git a/vendor/github.com/gogits/go-gogs-client/repo.go b/vendor/github.com/gogits/go-gogs-client/repo.go index f89aca54d..dc26d6c8c 100644 --- a/vendor/github.com/gogits/go-gogs-client/repo.go +++ b/vendor/github.com/gogits/go-gogs-client/repo.go @@ -27,6 +27,9 @@ type Repository struct { Description string `json:"description"` Private bool `json:"private"` Fork bool `json:"fork"` + ForkID int64 `json:"parent_id"` + Empty bool `json:"empty"` + Size int `json:"size"` Mirror bool `json:"mirror"` HTMLURL string `json:"html_url"` SSHURL string `json:"ssh_url"`