Skip to content

Commit

Permalink
Compare only user ids
Browse files Browse the repository at this point in the history
  • Loading branch information
andreisilviudragnea committed Aug 25, 2023
1 parent 9bf5b3e commit c67daab
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/github.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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()
}
}

0 comments on commit c67daab

Please sign in to comment.