Skip to content

Commit

Permalink
Loosen FCP restrictions
Browse files Browse the repository at this point in the history
Allows an item to enter FCP when a majority of team members has approved
and *no* team member has objected. This retains the consensus process,
but makes it so that FCP isn't blocked *by default*. Rather, members who
object to the proposal need to register a concern to block it.
  • Loading branch information
aturon committed Feb 16, 2018
1 parent eb14c59 commit b7b4e3f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 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

0 comments on commit b7b4e3f

Please sign in to comment.