ignore:
  - "**/generated/**/*"
  - "**/generated/*"
  - "**/cypress/**/*"
  - "cypress/**/*"
  - "**/instrumented/**/*"
  - "**/styles/**/*"
  - "styles/**/*"
  - "**/constants/**/*"
  - "constants/**/*"

coverage:
  status:
    # Omit merging unit/e2e reports into the defaults, as it is nonsensical.
    project: off
    patch: off

flag_management:
  default_rules:
    statuses:
      - type: project
        target: auto
        threshold: 1%
        # Adjust the base when removing code to avoid penalizing tech debt payback / dead code removal.
        removed_code_behavior: adjust_base
        if_ci_failed: error
      - type: patch
        target: 80%
  individual_flags:
    - name: unit-tests
    - name: e2e-tests
      # Wait until all machines have reported coverage - e2e tests run across 4 machines.
      after_n_builds: 4
      statuses:
        - type: patch
          target: 0%

comment:
  layout: flags
  # Wait until all machines have reported coverage - e2e tests run across 4 machines + unit tests across 1.
  after_n_builds: 5
  hide_comment_details: false

github_checks:
  # Turn off GitHub Check annotations, as they make it more difficult to review code.
  annotations: false
