File tree 1 file changed +19
-4
lines changed
1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -246,10 +246,25 @@ macro_rules! command_handlers {
246
246
log:: debug!( "skipping event, issue was {:?}" , e. action) ;
247
247
return ;
248
248
}
249
- Event :: IssueComment ( e) => if e. action == IssueCommentAction :: Deleted {
250
- // don't execute commands again when comment is deleted
251
- log:: debug!( "skipping event, comment was {:?}" , e. action) ;
252
- return ;
249
+ Event :: IssueComment ( e) => {
250
+ match e. action {
251
+ IssueCommentAction :: Created => { }
252
+ IssueCommentAction :: Edited => {
253
+ if event. comment_from( ) . is_none( ) {
254
+ // We are not entirely sure why this happens.
255
+ // Sometimes when someone posts a PR review,
256
+ // GitHub sends an "edited" event with no
257
+ // changes just before the "created" event.
258
+ log:: debug!( "skipping issue comment edit without changes" ) ;
259
+ return ;
260
+ }
261
+ }
262
+ IssueCommentAction :: Deleted => {
263
+ // don't execute commands again when comment is deleted
264
+ log:: debug!( "skipping event, comment was {:?}" , e. action) ;
265
+ return ;
266
+ }
267
+ }
253
268
}
254
269
Event :: Push ( _) | Event :: Create ( _) => {
255
270
log:: debug!( "skipping unsupported event" ) ;
You can’t perform that action at this time.
0 commit comments