In Reviewable, a revision becomes obsolete if any of the commits it covers are no longer part of the PR; this usually happens because of a force push. Those revisions are shown crossed out in the file matrix:
While Reviewable dealt with this just fine, until now custom review completion condition code couldn't tell whether if any of the review's revisions were obsolete. This could lead to unexpected outcomes, especially if you rolled back a branch making the last revision obsolete.
If your completion condition code ever assumed that the last revision is the latest / current one (this includes the sample conditions, if you copied them!), you'll need to fix it like so:
_.last(revisions) // BAD OLD WAY
_(revisions).reject('obsolete').last() // NEW WAY
This goes for both review.revisions
and individual file.revisions
. I updated the samples so you can safely crib from them again.
BTW, another way to fix this would have been to simply redact obsolete revisions from the data structure passed to the condition code. I decided against this approach because it would preclude some potentially useful condition logic.