Heads up: we now feed all files — even ones reverted to base — into your custom review completion condition. This aligns with our recent client-side changes to require reviews even if a file has been reverted.
No change is required on your side unless you were relying on those files being left out, in which case you'll need to update your logic. To assist with that we now set a reverted
flag on file revisions. We hope this will be pretty rare, though! 🤞
As long as you're checking your completion condition, you should see if other logic needs updating. We've recently observed a rise in execution errors due to conditions using outdated code from our examples from years ago. If you find any code that looks like this:
_(file.revisions).reject('obsolete').last()
Then you'll want to replace it with just:
_.last(file.revisions)
Even better, though, you might be able to get rid of the code altogether! A while ago Reviewable started accepting partial results from the completion condition and automatically filling in default values. Hence, if you don't need to customize pendingReviewers
(where the above snippet is most often used), you can just remove it from your return
object and delete all the code that feeds into computing it. 💥
If you do need to customize pendingReviewers
but want to use the default value as a base then, instead of recomputing it from scratch, you can now access review.pendingReviewers
and tweak it further before returning an updated list as usual.
As always, please don't hesitate to get in touch if you run into any trouble and we'll be happy to assist you.