@@ -260,11 +260,6 @@ func (n *actionsNotifier) CreateIssueComment(ctx context.Context, doer *user_mod
260260func  (n  * actionsNotifier ) UpdateComment (ctx  context.Context , doer  * user_model.User , c  * issues_model.Comment , oldContent  string ) {
261261	ctx  =  withMethod (ctx , "UpdateComment" )
262262
263- 	if  err  :=  c .LoadIssue (ctx ); err  !=  nil  {
264- 		log .Error ("LoadIssue: %v" , err )
265- 		return 
266- 	}
267- 
268263	if  c .Issue .IsPull  {
269264		notifyIssueCommentChange (ctx , doer , c , oldContent , webhook_module .HookEventPullRequestComment , api .HookIssueCommentEdited )
270265		return 
@@ -275,11 +270,6 @@ func (n *actionsNotifier) UpdateComment(ctx context.Context, doer *user_model.Us
275270func  (n  * actionsNotifier ) DeleteComment (ctx  context.Context , doer  * user_model.User , comment  * issues_model.Comment ) {
276271	ctx  =  withMethod (ctx , "DeleteComment" )
277272
278- 	if  err  :=  comment .LoadIssue (ctx ); err  !=  nil  {
279- 		log .Error ("LoadIssue: %v" , err )
280- 		return 
281- 	}
282- 
283273	if  comment .Issue .IsPull  {
284274		notifyIssueCommentChange (ctx , doer , comment , "" , webhook_module .HookEventPullRequestComment , api .HookIssueCommentDeleted )
285275		return 
@@ -288,6 +278,7 @@ func (n *actionsNotifier) DeleteComment(ctx context.Context, doer *user_model.Us
288278}
289279
290280func  notifyIssueCommentChange (ctx  context.Context , doer  * user_model.User , comment  * issues_model.Comment , oldContent  string , event  webhook_module.HookEventType , action  api.HookIssueCommentAction ) {
281+ 	comment .Issue  =  nil  // force issue to be loaded 
291282	if  err  :=  comment .LoadIssue (ctx ); err  !=  nil  {
292283		log .Error ("LoadIssue: %v" , err )
293284		return 
0 commit comments