mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 03:18:24 +00:00 
			
		
		
		
	Reload issue when sending webhook to make num comments is right. (#35243)
Fix #35229 --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
		| @@ -80,6 +80,12 @@ func CreateIssueComment(ctx context.Context, doer *user_model.User, repo *repo_m | ||||
| 		return nil, err | ||||
| 	} | ||||
|  | ||||
| 	// reload issue to ensure it has the latest data, especially the number of comments | ||||
| 	issue, err = issues_model.GetIssueByID(ctx, issue.ID) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
|  | ||||
| 	notify_service.CreateIssueComment(ctx, doer, repo, issue, comment, mentions) | ||||
|  | ||||
| 	return comment, nil | ||||
|   | ||||
		Reference in New Issue
	
	Block a user