mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	[Patch] Fix closed PR also triggers Webhooks and actions (#23782)
Fix #23707 Cause by #23189 This PR is a quick fix that, when pushing commits to closed PR, webhook and actions also be triggered.
This commit is contained in:
		@@ -294,6 +294,10 @@ func AddTestPullRequestTask(doer *user_model.User, repoID int64, branch string,
 | 
			
		||||
			}
 | 
			
		||||
			if err == nil {
 | 
			
		||||
				for _, pr := range prs {
 | 
			
		||||
					if pr.Issue.IsClosed {
 | 
			
		||||
						// The closed PR never trigger action or webhook
 | 
			
		||||
						continue
 | 
			
		||||
					}
 | 
			
		||||
					if newCommitID != "" && newCommitID != git.EmptySHA {
 | 
			
		||||
						changed, err := checkIfPRContentChanged(ctx, pr, oldCommitID, newCommitID)
 | 
			
		||||
						if err != nil {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user