From c81e72cc045b635f5b7a8f13c8348f4861418534 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Mon, 6 Jun 2022 11:29:09 -0700 Subject: [PATCH] eval/nixpkgs: more logging re: maintainers --- ofborg/src/tasks/eval/nixpkgs.rs | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/ofborg/src/tasks/eval/nixpkgs.rs b/ofborg/src/tasks/eval/nixpkgs.rs index 7b0edaf..5ca83bf 100644 --- a/ofborg/src/tasks/eval/nixpkgs.rs +++ b/ofborg/src/tasks/eval/nixpkgs.rs @@ -588,13 +588,19 @@ impl<'a> EvaluationStrategy for NixpkgsStrategy<'a> { fn request_reviews(maint: &maintainers::ImpactedMaintainers, pull: &hubcaps::pulls::PullRequest) { let pull_meta = pull.get(); + info!("Impacted maintainers: {:?}", maint.maintainers()); if maint.maintainers().len() < 10 { for maintainer in maint.maintainers() { - if let Ok(meta) = &pull_meta { - // GitHub doesn't let us request a review from the PR author, so - // we silently skip them. - if meta.user.login.to_ascii_lowercase() == maintainer.to_ascii_lowercase() { - continue; + match &pull_meta { + Ok(meta) => { + // GitHub doesn't let us request a review from the PR author, so + // we silently skip them. + if meta.user.login.to_ascii_lowercase() == maintainer.to_ascii_lowercase() { + continue; + } + } + Err(e) => { + warn!("PR meta was invalid? {:?}", e); } } @@ -608,6 +614,11 @@ fn request_reviews(maint: &maintainers::ImpactedMaintainers, pull: &hubcaps::pul warn!("Failure requesting a review from {}: {:?}", maintainer, e,); } } + } else { + warn!( + "Too many reviewers ({}), skipping review requests", + maint.maintainers().len() + ); } }