Skip to content

Commit 97a34c5

Browse files
committed
Improve trigger phrase detection
Signed-off-by: Michael Yuan <[email protected]>
1 parent ba06812 commit 97a34c5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/github-pr-summary.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,11 @@ async fn handler(event: Result<WebhookEvent, serde_json::Error>) {
8282
return;
8383
};
8484

85-
if !body.to_lowercase().contains(&trigger_phrase.to_lowercase()) {
85+
if !body.to_lowercase().starts_with(&trigger_phrase.to_lowercase()) {
8686
log::info!("Ignore the comment without the magic words");
8787
return;
8888
}
8989

90-
log::debug!("Will process comment event: {:?}", &body);
9190
(e.issue.title, e.issue.number, e.issue.user.login)
9291
}
9392
_ => return,

0 commit comments

Comments
 (0)