mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Provide option to unlink a fork (#11858)
* Provide option to unlink a fork Fix #4566 Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review Co-authored-by: techknowlogick <matti@mdranta.net> * Add check that user can create repo Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @cirnoT Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <matti@mdranta.net>
This commit is contained in:
		@@ -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)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user