@@ -260,11 +260,6 @@ func (n *actionsNotifier) CreateIssueComment(ctx context.Context, doer *user_mod
260
260
func (n * actionsNotifier ) UpdateComment (ctx context.Context , doer * user_model.User , c * issues_model.Comment , oldContent string ) {
261
261
ctx = withMethod (ctx , "UpdateComment" )
262
262
263
- if err := c .LoadIssue (ctx ); err != nil {
264
- log .Error ("LoadIssue: %v" , err )
265
- return
266
- }
267
-
268
263
if c .Issue .IsPull {
269
264
notifyIssueCommentChange (ctx , doer , c , oldContent , webhook_module .HookEventPullRequestComment , api .HookIssueCommentEdited )
270
265
return
@@ -275,11 +270,6 @@ func (n *actionsNotifier) UpdateComment(ctx context.Context, doer *user_model.Us
275
270
func (n * actionsNotifier ) DeleteComment (ctx context.Context , doer * user_model.User , comment * issues_model.Comment ) {
276
271
ctx = withMethod (ctx , "DeleteComment" )
277
272
278
- if err := comment .LoadIssue (ctx ); err != nil {
279
- log .Error ("LoadIssue: %v" , err )
280
- return
281
- }
282
-
283
273
if comment .Issue .IsPull {
284
274
notifyIssueCommentChange (ctx , doer , comment , "" , webhook_module .HookEventPullRequestComment , api .HookIssueCommentDeleted )
285
275
return
@@ -288,6 +278,7 @@ func (n *actionsNotifier) DeleteComment(ctx context.Context, doer *user_model.Us
288
278
}
289
279
290
280
func 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
291
282
if err := comment .LoadIssue (ctx ); err != nil {
292
283
log .Error ("LoadIssue: %v" , err )
293
284
return
0 commit comments