Browse Source

mentions: Only supress mention when just the author is to be CC'd.

See https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Triagebot.20mentions.20not.20working.20for.20rustdoc-json for more detail.
Nixon Enraght-Moony 2 years ago
parent
commit
95bab6873b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/handlers/mentions.rs

+ 2 - 2
src/handlers/mentions.rs

@@ -62,13 +62,13 @@ pub(super) async fn parse_input(
             .paths
             .iter()
             // Only mention matching paths.
-            // Don't mention if the author is in the list.
+            // Don't mention if only the author is in the list.
             .filter(|(path, MentionsPathConfig { cc, .. })| {
                 let path = Path::new(path);
                 file_paths.iter().any(|p| p.starts_with(path))
                     && !cc
                         .iter()
-                        .any(|r| r.trim_start_matches('@') == &event.issue.user.login)
+                        .all(|r| r.trim_start_matches('@') == &event.issue.user.login)
             })
             .map(|(key, _mention)| key.to_string())
             .collect();