eval/nixpkgs: more logging re: maintainers

This commit is contained in:
Cole Helbling 2022-06-06 11:29:09 -07:00
parent e56a1e18ec
commit c81e72cc04

View file

@ -588,13 +588,19 @@ impl<'a> EvaluationStrategy for NixpkgsStrategy<'a> {
fn request_reviews(maint: &maintainers::ImpactedMaintainers, pull: &hubcaps::pulls::PullRequest) { fn request_reviews(maint: &maintainers::ImpactedMaintainers, pull: &hubcaps::pulls::PullRequest) {
let pull_meta = pull.get(); let pull_meta = pull.get();
info!("Impacted maintainers: {:?}", maint.maintainers());
if maint.maintainers().len() < 10 { if maint.maintainers().len() < 10 {
for maintainer in maint.maintainers() { for maintainer in maint.maintainers() {
if let Ok(meta) = &pull_meta { match &pull_meta {
// GitHub doesn't let us request a review from the PR author, so Ok(meta) => {
// we silently skip them. // GitHub doesn't let us request a review from the PR author, so
if meta.user.login.to_ascii_lowercase() == maintainer.to_ascii_lowercase() { // we silently skip them.
continue; 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,); warn!("Failure requesting a review from {}: {:?}", maintainer, e,);
} }
} }
} else {
warn!(
"Too many reviewers ({}), skipping review requests",
maint.maintainers().len()
);
} }
} }