瀏覽代碼

Fix rust-lang/rust filters on commits and milestone handlers

Previously we would make an attempt if at least one of the organization or
repository was "rust-lang" or "rust", respectively.
Mark Rousskov 4 年之前
父節點
當前提交
34c01cb520
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/handlers/milestone_prs.rs
  2. 1 1
      src/handlers/rustc_commits.rs

+ 1 - 1
src/handlers/milestone_prs.rs

@@ -18,7 +18,7 @@ pub async fn handle(ctx: &Context, event: &Event) -> anyhow::Result<()> {
     }
 
     let repo = e.issue.repository();
-    if repo.organization != "rust-lang" && repo.repository != "rust" {
+    if !(repo.organization == "rust-lang" && repo.repository == "rust") {
         return Ok(());
     }
 

+ 1 - 1
src/handlers/rustc_commits.rs

@@ -34,7 +34,7 @@ pub async fn handle(ctx: &Context, event: &Event) -> anyhow::Result<()> {
     }
 
     let repo = event.issue.repository();
-    if repo.organization != "rust-lang" && repo.repository != "rust" {
+    if !(repo.organization == "rust-lang" && repo.repository == "rust") {
         return Ok(());
     }