mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Rename repo.GetOwner to repo.LoadOwner (#22967)
				
					
				
			Fixes https://github.com/go-gitea/gitea/issues/22963 --------- Co-authored-by: Yarden Shoham <hrsi88@gmail.com>
This commit is contained in:
		@@ -314,8 +314,8 @@ type WhitelistOptions struct {
 | 
			
		||||
// This function also performs check if whitelist user and team's IDs have been changed
 | 
			
		||||
// to avoid unnecessary whitelist delete and regenerate.
 | 
			
		||||
func UpdateProtectBranch(ctx context.Context, repo *repo_model.Repository, protectBranch *ProtectedBranch, opts WhitelistOptions) (err error) {
 | 
			
		||||
	if err = repo.GetOwner(ctx); err != nil {
 | 
			
		||||
		return fmt.Errorf("GetOwner: %v", err)
 | 
			
		||||
	if err = repo.LoadOwner(ctx); err != nil {
 | 
			
		||||
		return fmt.Errorf("LoadOwner: %v", err)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	whitelist, err := updateUserWhitelist(ctx, repo, protectBranch.WhitelistUserIDs, opts.UserIDs)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user