Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loosen FCP restrictions #188

Merged
merged 2 commits into from
Feb 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/github/nag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ fn evaluate_nags() -> DashResult<()> {
}
};

let num_active_reviews = reviews.iter().filter(|&&(_, ref r)| !r.reviewed).count();
let num_outstanding_reviews = reviews.iter().filter(|&&(_, ref r)| !r.reviewed).count();
let num_complete_reviews = reviews.len() - num_outstanding_reviews;
let num_active_concerns = concerns
.iter()
.filter(|&&(_, ref c)| c.fk_resolved_comment.is_none())
Expand Down Expand Up @@ -255,7 +256,9 @@ fn evaluate_nags() -> DashResult<()> {
};
}

if num_active_reviews == 0 && num_active_concerns == 0 {
let majority_complete = num_outstanding_reviews < num_complete_reviews;

if num_active_concerns == 0 && majority_complete && num_outstanding_reviews < 3 {
// TODO only record the fcp as started if we know that we successfully commented
// i.e. either the comment claims to have posted, or we get a comment back to reconcile

Expand Down Expand Up @@ -905,7 +908,7 @@ impl<'a> RfcBotComment<'a> {
}
}

msg.push_str("\nOnce these reviewers reach consensus, this will enter its final ");
msg.push_str("\nOnce a majority of reviewers approve (and none object), this will enter its final ");
msg.push_str("comment period. If you spot a major issue that hasn't been raised ");
msg.push_str("at any point in this process, please speak up!\n");

Expand Down