mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Move mirror sync actions to notification (#9022)
* Move mirror sync actions to notification * fix lint
This commit is contained in:
		
				
					committed by
					
						
						techknowlogick
					
				
			
			
				
	
			
			
			
						parent
						
							e3f22ad2cc
						
					
				
				
					commit
					8ab35eefc4
				
			@@ -88,6 +88,19 @@ func RefEndName(refStr string) string {
 | 
			
		||||
	return refStr
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SplitRefName splits a full refname to reftype and simple refname
 | 
			
		||||
func SplitRefName(refStr string) (string, string) {
 | 
			
		||||
	if strings.HasPrefix(refStr, BranchPrefix) {
 | 
			
		||||
		return BranchPrefix, refStr[len(BranchPrefix):]
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if strings.HasPrefix(refStr, TagPrefix) {
 | 
			
		||||
		return TagPrefix, refStr[len(TagPrefix):]
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return "", refStr
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ParseBool returns the boolean value represented by the string as per git's git_config_bool
 | 
			
		||||
// true will be returned for the result if the string is empty, but valid will be false.
 | 
			
		||||
// "true", "yes", "on" are all true, true
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user