Prechádzať zdrojové kódy

Merge pull request #1494 from Mark-Simulacrum/drop-pings

Avoid comments consisting of just pings
Mark Rousskov 3 rokov pred
rodič
commit
e89e1d524a
1 zmenil súbory, kde vykonal 1 pridanie a 13 odobranie
  1. 1 13
      src/handlers/shortcut.rs

+ 1 - 13
src/handlers/shortcut.rs

@@ -6,7 +6,7 @@ use crate::{
     config::ShortcutConfig,
     github::{Event, Label},
     handlers::Context,
-    interactions::{ErrorComment, PingComment},
+    interactions::ErrorComment,
 };
 use parser::command::shortcut::ShortcutCommand;
 
@@ -37,14 +37,6 @@ pub(super) async fn handle_command(
                 return Ok(());
             }
             issue.set_labels(&ctx.github, issue_labels).await?;
-
-            let to_ping: Vec<_> = issue
-                .assignees
-                .iter()
-                .map(|user| user.login.as_str())
-                .collect();
-            let cmnt = PingComment::new(&issue, &to_ping);
-            cmnt.post(&ctx.github).await?;
         }
         ShortcutCommand::Author => {
             if assign_and_remove_label(&mut issue_labels, waiting_on_author, waiting_on_review)
@@ -53,10 +45,6 @@ pub(super) async fn handle_command(
                 return Ok(());
             }
             issue.set_labels(&ctx.github, issue_labels).await?;
-
-            let to_ping = vec![issue.user.login.as_str()];
-            let cmnt = PingComment::new(&issue, &to_ping);
-            cmnt.post(&ctx.github).await?;
         }
     }