@@ -50,6 +50,14 @@ func DeleteWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model
5050func CreateIssueComment (ctx context.Context , doer * user_model.User , repo * repo_model.Repository ,
5151 issue * issues_model.Issue , comment * issues_model.Comment , mentions []* user_model.User ,
5252) {
53+ if err := comment .LoadReview (ctx ); err != nil {
54+ log .Error ("LoadReview: %v" , err )
55+ return
56+ } else if comment .Review != nil && comment .Review .Type == issues_model .ReviewTypePending {
57+ // Pending review comments updating should not triggered
58+ return
59+ }
60+
5361 for _ , notifier := range notifiers {
5462 notifier .CreateIssueComment (ctx , doer , repo , issue , comment , mentions )
5563 }
@@ -156,13 +164,29 @@ func PullReviewDismiss(ctx context.Context, doer *user_model.User, review *issue
156164
157165// UpdateComment notifies update comment to notifiers
158166func UpdateComment (ctx context.Context , doer * user_model.User , c * issues_model.Comment , oldContent string ) {
167+ if err := c .LoadReview (ctx ); err != nil {
168+ log .Error ("LoadReview: %v" , err )
169+ return
170+ } else if c .Review != nil && c .Review .Type == issues_model .ReviewTypePending {
171+ // Pending review comments updating should not triggered
172+ return
173+ }
174+
159175 for _ , notifier := range notifiers {
160176 notifier .UpdateComment (ctx , doer , c , oldContent )
161177 }
162178}
163179
164180// DeleteComment notifies delete comment to notifiers
165181func DeleteComment (ctx context.Context , doer * user_model.User , c * issues_model.Comment ) {
182+ if err := c .LoadReview (ctx ); err != nil {
183+ log .Error ("LoadReview: %v" , err )
184+ return
185+ } else if c .Review != nil && c .Review .Type == issues_model .ReviewTypePending {
186+ // Pending review comments updating should not triggered
187+ return
188+ }
189+
166190 for _ , notifier := range notifiers {
167191 notifier .DeleteComment (ctx , doer , c )
168192 }
0 commit comments