mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-30 14:01:02 +00:00 
			
		
		
		
	Fix update by rebase being wrongly disabled by protected base branch (#22825)
The branch this is force pushing to is the head branch in the head repo, so it should be checking if that is protected, not the base.
This commit is contained in:
		
					parent
					
						
							
								137fcc989b
							
						
					
				
			
			
				commit
				
					
						bdd2c9d2ef
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -106,7 +106,7 @@ func IsUserAllowedToUpdate(ctx context.Context, pull *issues_model.PullRequest, | ||||||
| 		BaseBranch: pull.HeadBranch, | 		BaseBranch: pull.HeadBranch, | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	pb, err := git_model.GetFirstMatchProtectedBranchRule(ctx, pull.BaseRepoID, pull.BaseBranch) | 	pb, err := git_model.GetFirstMatchProtectedBranchRule(ctx, pr.BaseRepoID, pr.BaseBranch) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return false, false, err | 		return false, false, err | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue