Skip to content

Commit

Permalink
request reviews one at a time
Browse files Browse the repository at this point in the history
if a batch of review requests contains any users who are not members of the organization, the entire request fails.
  • Loading branch information
grahamc committed Jan 16, 2019
1 parent 22e7d0a commit f151c71
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions ofborg/src/tasks/massrebuilder.rs
Expand Up @@ -737,18 +737,16 @@ fn request_reviews(
) {
if let Ok(ref maint) = m {
if maint.maintainers().len() < 10 {
if let Err(e) =
pull.review_requests()
.create(&hubcaps::review_requests::ReviewRequestOptions {
reviewers: maint.maintainers(),
team_reviewers: vec![],
})
{
println!(
"Failure adding review requests for maintainers ({:?}): {:#?}",
maint.maintainers(),
e,
);
for maintainer in maint.maintainers() {
if let Err(e) =
pull.review_requests()
.create(&hubcaps::review_requests::ReviewRequestOptions {
reviewers: vec![maintainer.clone()],
team_reviewers: vec![],
})
{
println!("Failure requesting a review from {}: {:#?}", maintainer, e,);
}
}
}
}
Expand Down

0 comments on commit f151c71

Please sign in to comment.