Skip to content

Commit

Permalink
More logging
Browse files Browse the repository at this point in the history
  • Loading branch information
andreisilviudragnea committed Aug 25, 2023
1 parent 2aa3065 commit 9bf5b3e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/github.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use log::info;
use log::{debug, info};
use std::env::var;
use std::fs;

Expand Down Expand Up @@ -82,14 +82,14 @@ impl Github for GithubClient {
.await
.unwrap();

info!("page {page:?}");
debug!("page {page:?}");

let mut all_prs = page.items;

while let Some(url) = page.next {
page = self.octocrab.get_page(&Some(url)).await.unwrap().unwrap();

info!("page {page:?}");
debug!("page {page:?}");

all_prs.append(&mut page.items);
}
Expand All @@ -98,7 +98,12 @@ impl Github for GithubClient {

all_prs
.into_iter()
.filter(|pr| **pr.user.as_ref().unwrap() == current_user)
.filter(|pr| {
let user = pr.user.as_ref().unwrap();
let result = **user == current_user;
info!("user {user:?} current_user {current_user:?} result {result}");
result
})
.collect()
}
}

0 comments on commit 9bf5b3e

Please sign in to comment.