From 482ba937ed118d68448c5fe347ee7e43f5621c0b Mon Sep 17 00:00:00 2001 From: zeripath Date: Thu, 2 Jul 2020 15:09:09 +0100 Subject: Provide option to unlink a fork (#11858) * Provide option to unlink a fork Fix #4566 Signed-off-by: Andrew Thornton * Apply suggestions from code review Co-authored-by: techknowlogick * Add check that user can create repo Signed-off-by: Andrew Thornton * as per @cirnoT Signed-off-by: Andrew Thornton Co-authored-by: techknowlogick --- models/repo.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'models/repo.go') diff --git a/models/repo.go b/models/repo.go index 3b874f3359..c7d2ef467c 100644 --- a/models/repo.go +++ b/models/repo.go @@ -209,19 +209,9 @@ func (repo *Repository) SanitizedOriginalURL() string { // ColorFormat returns a colored string to represent this repo func (repo *Repository) ColorFormat(s fmt.State) { - var ownerName interface{} - - if repo.OwnerName != "" { - ownerName = repo.OwnerName - } else if repo.Owner != nil { - ownerName = repo.Owner.Name - } else { - ownerName = log.NewColoredIDValue(strconv.FormatInt(repo.OwnerID, 10)) - } - log.ColorFprintf(s, "%d:%s/%s", log.NewColoredIDValue(repo.ID), - ownerName, + repo.OwnerName, repo.Name) } -- cgit v1.2.3