With advanced use of the conditions setting, you can set up reviews to be done in "phases", or happen in separate steps.
This is particularly useful if there are certain people that you don't want to bug until other parts of the review have been completed — either because their time is more valuable or because their area of review isn't necessary until other aspects have already been approved.
You can set this up by making groups depend on other groups. The
groups variable comes with a set of convenient properties for
checking the state of other groups.
Important: Groups are evaluated in order, and the
groups variable only contains the preceding groups when you write
version: 3 groups: code: ... database: ... conditions: # only asked to review once the other 2 groups are finished (or are not applicable) - "'code' in groups.approved"
You can implement a "fallback" set of reviewers by placing the group last, and checking whether any of the previous groups have been activated (i.e. conditions met).
version: 3 groups: code: ... database: ... fallback: ... conditions: # this group is asked to review if no previous groups match this PR - "len(groups.active) == 0" # or "not groups.active"