diff --git a/src/handlers.rs b/src/handlers.rs index d2bf47d8..4edd9c38 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -178,7 +178,17 @@ macro_rules! command_handlers { errors: &mut Vec, ) { match event { - Event::Issue(e) => if !matches!(e.action, IssuesAction::Opened | IssuesAction::Edited) { + // always handle new PRs / issues + Event::Issue(IssuesEvent { action: IssuesAction::Opened, .. }) => {}, + Event::Issue(IssuesEvent { action: IssuesAction::Edited, .. }) => { + // if the issue was edited, but we don't get a `changes[body]` diff, it means only the title was edited, not the body. + // don't process the same commands twice. + if event.comment_from().is_none() { + log::debug!("skipping title-only edit event"); + return; + } + }, + Event::Issue(e) => { // no change in issue's body for these events, so skip log::debug!("skipping event, issue was {:?}", e.action); return;