Merge pull request #303 from NixOS/request-reviews-one-at-a-time

request reviews one at a time
This commit is contained in:
Graham Christensen 2019-01-16 09:28:39 -05:00 committed by GitHub
commit e7e6d7314a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -737,18 +737,16 @@ fn request_reviews(
) { ) {
if let Ok(ref maint) = m { if let Ok(ref maint) = m {
if maint.maintainers().len() < 10 { if maint.maintainers().len() < 10 {
if let Err(e) = for maintainer in maint.maintainers() {
pull.review_requests() if let Err(e) =
.create(&hubcaps::review_requests::ReviewRequestOptions { pull.review_requests()
reviewers: maint.maintainers(), .create(&hubcaps::review_requests::ReviewRequestOptions {
team_reviewers: vec![], reviewers: vec![maintainer.clone()],
}) team_reviewers: vec![],
{ })
println!( {
"Failure adding review requests for maintainers ({:?}): {:#?}", println!("Failure requesting a review from {}: {:#?}", maintainer, e,);
maint.maintainers(), }
e,
);
} }
} }
} }