@@ -263,11 +263,6 @@ func (n *actionsNotifier) CreateIssueComment(ctx context.Context, doer *user_mod
263
263
func (n * actionsNotifier ) UpdateComment (ctx context.Context , doer * user_model.User , c * issues_model.Comment , oldContent string ) {
264
264
ctx = withMethod (ctx , "UpdateComment" )
265
265
266
- if err := c .LoadIssue (ctx ); err != nil {
267
- log .Error ("LoadIssue: %v" , err )
268
- return
269
- }
270
-
271
266
if c .Issue .IsPull {
272
267
notifyIssueCommentChange (ctx , doer , c , oldContent , webhook_module .HookEventPullRequestComment , api .HookIssueCommentEdited )
273
268
return
@@ -278,11 +273,6 @@ func (n *actionsNotifier) UpdateComment(ctx context.Context, doer *user_model.Us
278
273
func (n * actionsNotifier ) DeleteComment (ctx context.Context , doer * user_model.User , comment * issues_model.Comment ) {
279
274
ctx = withMethod (ctx , "DeleteComment" )
280
275
281
- if err := comment .LoadIssue (ctx ); err != nil {
282
- log .Error ("LoadIssue: %v" , err )
283
- return
284
- }
285
-
286
276
if comment .Issue .IsPull {
287
277
notifyIssueCommentChange (ctx , doer , comment , "" , webhook_module .HookEventPullRequestComment , api .HookIssueCommentDeleted )
288
278
return
@@ -291,6 +281,7 @@ func (n *actionsNotifier) DeleteComment(ctx context.Context, doer *user_model.Us
291
281
}
292
282
293
283
func notifyIssueCommentChange (ctx context.Context , doer * user_model.User , comment * issues_model.Comment , oldContent string , event webhook_module.HookEventType , action api.HookIssueCommentAction ) {
284
+ comment .Issue = nil // force issue to be loaded
294
285
if err := comment .LoadIssue (ctx ); err != nil {
295
286
log .Error ("LoadIssue: %v" , err )
296
287
return
0 commit comments