mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Mark PR reviews as stale at push and allow to dismiss stale approvals (#9532)
Fix #5997. If a push causes the patch/diff of a PR towards target branch to change, all existing reviews for the PR will be set and shown as stale. New branch protection option to dismiss stale approvals are added. To show that a review is not based on the latest PR changes, an hourglass is shown
This commit is contained in:
		
				
					committed by
					
						
						zeripath
					
				
			
			
				
	
			
			
			
						parent
						
							5b2d9333f1
						
					
				
				
					commit
					25531c71a7
				
			@@ -112,3 +112,9 @@ func (repo *Repository) GetPatch(base, head string, w io.Writer) error {
 | 
			
		||||
	return NewCommand("format-patch", "--binary", "--stdout", base+"..."+head).
 | 
			
		||||
		RunInDirPipeline(repo.Path, w, nil)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetDiffFromMergeBase generates and return patch data from merge base to head
 | 
			
		||||
func (repo *Repository) GetDiffFromMergeBase(base, head string, w io.Writer) error {
 | 
			
		||||
	return NewCommand("diff", "-p", "--binary", base+"..."+head).
 | 
			
		||||
		RunInDirPipeline(repo.Path, w, nil)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user