Example

Require 2 of 4 optional teams to approve a PR

Use "optional" groups for more control over the review flow.

In this case, you can share responsiblity over part of the codebase and require that 2 of the 4 teams approve it.

version: 3
groups:
  shared-code-team-a:
    type: optional
    conditions:
      - files.include('shared/*')
    reviewers:
      teams: [team-a]

  shared-code-team-b:
    type: optional
    conditions:
      - files.include('shared/*')
    reviewers:
      teams: [team-b]

  shared-code-team-c:
    type: optional
    conditions:
      - files.include('shared/*')
    reviewers:
      teams: [team-c]

  shared-code-team-d:
    type: optional
    conditions:
      - files.include('shared/*')
    reviewers:
      teams: [team-d]

  shared:
    type: required
    conditions:
      - len(groups.approved.include('shared-code-*')) >= 2
    reviews:
      required: 0

Docs

Features

Config

Context

Resources

© 2020 Dropseed, LLC