From c67daab942095f452aa25d4d0c39e96cc81c6bed Mon Sep 17 00:00:00 2001 From: Andrei Silviu Dragnea Date: Fri, 25 Aug 2023 12:12:05 +0300 Subject: [PATCH] Compare only user ids --- src/github.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/github.rs b/src/github.rs index 62a9403..5f322dd 100644 --- a/src/github.rs +++ b/src/github.rs @@ -1,7 +1,7 @@ -use log::{debug, info}; use std::env::var; use std::fs; +use log::debug; use octocrab::models::pulls::PullRequest; use octocrab::models::Repository; use octocrab::params::State; @@ -98,12 +98,7 @@ impl Github for GithubClient { all_prs .into_iter() - .filter(|pr| { - let user = pr.user.as_ref().unwrap(); - let result = **user == current_user; - info!("user {user:?} current_user {current_user:?} result {result}"); - result - }) + .filter(|pr| pr.user.as_ref().unwrap().id == current_user.id) .collect() } }