# Configuration for pullapprove.com
#
# Approval access and primary role is determined by info in the project ownership spreadsheet:
# https://docs.google.com/spreadsheets/d/1-HIlzfbPYGsPr9KuYMe6bLfc4LXzPjpoALqtYRYTZB0/edit?pli=1#gid=0&vpid=A5
#
# === GitHub username to Full name map ===
#
# alexeagle - Alex Eagle
# alxhub - Alex Rickabaugh
# andrewseguin - Andrew Seguin
# benlesh - Ben Lesh
# brandonroberts - Brandon Roberts
# brocco - Mike Brocchi
# filipesilva - Filipe Silva
# gkalpak - George Kalpakas
# hansl - Hans Larsen
# IgorMinar - Igor Minar
# jasonaden - Jason Aden
# jenniferfell - Jennifer Fell
# kara - Kara Erickson
# kyliau - Keen Yee Liau
# matsko - Matias Niemelä
# mhevery - Misko Hevery
# petebacondarwin - Pete Bacon Darwin
# pkozlowski-opensource - Pawel Kozlowski
# robwormald - Rob Wormald
# vikerman - Vikram Subramanian


version: 2

group_defaults:
  required: 1
  reset_on_reopened:
    enabled: true
  approve_by_comment:
    enabled: false
  # see http://docs.pullapprove.com/groups/author_approval/
  author_approval:
    # If the author is a reviewer on the PR, they will automatically have an "approved" status.
    auto: true

groups:
  # Require all PRs to have at least one approval from *someone*
  all:
    users: all
    required: 1
    rejection_value: -999
    # In this group, your self-approval does not count
    author_approval:
      auto: false
      ignored: true
    files:
      include:
        - "*"

  root:
    conditions:
      files:
        include:
          - "*"
        exclude:
          - "WORKSPACE"
          - "BUILD.bazel"
          - ".circleci/*"
          - "aio/*"
          - "integration/*"
          - "modules/*"
          - "packages/*"
          - "tools/*"
    users:
      - alexeagle
      - IgorMinar
      - mhevery

  public-api:
    conditions:
      files:
        include:
          - "tools/public_api_guard/*"
    users:
      - IgorMinar
      - mhevery

  bazel:
    conditions:
      files:
        include:
          - "WORKSPACE"
          - ".bazel*"
          - "*.bazel"
          - "*.bzl"
          - "packages/bazel/*"
          - "/docs/BAZEL.md"
    users:
      - alexeagle #primary
      - kyliau
      - IgorMinar #fallback
      - mhevery
      - vikerman #fallback

  build-and-ci:
    conditions:
      files:
        include:
          - "*.yml"
          - "*.json"
          - "*.lock"
          - "tools/*"
        exclude:
          - "tools/public_api_guard/*"
          - "aio/*"
    users:
      - IgorMinar #primary
      - alexeagle
      - jasonaden
      - mhevery #fallback

  integration:
    conditions:
      files:
        - "integration/*"
    users:
      - alexeagle
      - mhevery
      - IgorMinar #fallback

  core:
    conditions:
      files:
        - "packages/core/*"
        - "aio/content/guide/bootstrapping.md"
        - "aio/content/examples/bootstrapping/*"
        - "aio/content/guide/attribute-directives.md"
        - "aio/content/examples/attribute-directives/*"
        - "aio/content/images/guide/attribute-directives/*"
        - "aio/content/guide/structural-directives.md"
        - "aio/content/examples/structural-directives/*"
        - "aio/content/images/guide/structural-directives/*"
        - "aio/content/guide/dynamic-component-loader.md"
        - "aio/content/examples/dynamic-component-loader/*"
        - "aio/content/images/guide/dynamic-component-loader/*"
        - "aio/content/guide/template-syntax.md"
        - "aio/content/examples/template-syntax/*"
        - "aio/content/images/guide/template-syntax/*"
        - "aio/content/guide/dependency-injection.md"
        - "aio/content/examples/dependency-injection/*"
        - "aio/content/images/guide/dependency-injection/*"
        - "aio/content/guide/dependency-injection-in-action.md"
        - "aio/content/examples/dependency-injection-in-action/*"
        - "aio/content/images/guide/dependency-injection-in-action/*"
        - "aio/content/guide/hierarchical-dependency-injection.md"
        - "aio/content/examples/hierarchical-dependency-injection/*"
        - "aio/content/guide/singleton-services.md"
        - "aio/content/guide/dependency-injection-pattern.md"
        - "aio/content/guide/providers.md"
        - "aio/content/examples/providers/*"
        - "aio/content/guide/component-interaction.md"
        - "aio/content/examples/component-interaction/*"
        - "aio/content/images/guide/component-interaction/*"
        - "aio/content/guide/component-styles.md"
        - "aio/content/examples/component-styles/*"
        - "aio/content/guide/lifecycle-hooks.md"
        - "aio/content/examples/lifecycle-hooks/*"
        - "aio/content/images/guide/lifecycle-hooks/*"
        - "aio/content/examples/ngcontainer/*"
        - "aio/content/images/guide/ngcontainer/*"
        - "aio/content/guide/pipes.md"
        - "aio/content/examples/pipes/*"
        - "aio/content/images/guide/pipes/*"
        - "aio/content/guide/entry-components.md"
        - "aio/content/guide/set-document-title.md"
        - "aio/content/examples/set-document-title/*"
        - "aio/content/images/guide/set-document-title/*"
        - "aio/content/guide/ngmodules.md"
        - "aio/content/examples/ngmodules/*"
        - "aio/content/examples/ngmodule/*"
        - "aio/content/images/guide/ngmodule/*"
        - "aio/content/guide/ngmodule-faq.md"
        - "aio/content/examples/ngmodule-faq/*"
        - "aio/content/guide/module-types.md"
        - "aio/content/guide/sharing-ngmodules.md"
        - "aio/content/guide/frequent-ngmodules.md"
        - "aio/content/images/guide/frequent-ngmodules/*"
        - "aio/content/guide/ngmodule-api.md"
        - "aio/content/guide/ngmodule-vs-jsmodule.md"
        - "aio/content/guide/feature-modules.md"
        - "aio/content/examples/feature-modules/*"
        - "aio/content/images/guide/feature-modules/*"
        - "aio/content/guide/lazy-loading-ngmodules.md"
        - "aio/content/examples/lazy-loading-ngmodules/*"
        - "aio/content/images/guide/lazy-loading-ngmodules"
    users:
      - mhevery #primary
      - jasonaden
      - kara
      - IgorMinar
      - jenniferfell #docs only

  animations:
    conditions:
      files:
        - "packages/animations/*"
        - "packages/platform-browser/animations/*"
        - "aio/content/guide/animations.md"
        - "aio/content/examples/animations/*"
        - "aio/content/images/guide/animations/*"
    users:
      - matsko #primary
      - mhevery #fallback
      - IgorMinar #fallback
      - jenniferfell #docs only

  compiler/i18n:
    conditions:
      files:
        - "packages/compiler/src/i18n/*"
        - "aio/content/guide/i18n.md"
        - "aio/content/examples/i18n/*"
    users:
      - alxhub #primary
      - IgorMinar #fallback
      - mhevery #fallback
      - jenniferfell #docs only

  compiler:
    conditions:
      files:
        - "packages/compiler/*"
        - "aio/content/guide/aot-compiler.md"
    users:
      - alxhub #primary
      - mhevery
      - IgorMinar #fallback
      - jenniferfell #docs only

  compiler-cli/ngtools:
    conditions:
      files:
        - "packages/compiler-cli/src/ngtools*"
    users:
      - hansl
      - filipesilva #fallback
      - IgorMinar #fallback

  compiler-cli:
    conditions:
      files:
        include:
          - "packages/compiler-cli/*"
          - "packages/bazel/*"
        exclude:
          - "packages/compiler-cli/src/ngtools*"
    users:
      - alexeagle
      - alxhub
      - IgorMinar #fallback
      - mhevery #fallback

  common:
    conditions:
      files:
        include:
          - "packages/common/*"
        exclude:
          - "packages/common/http/*"
    users:
      - pkozlowski-opensource #primary
      - IgorMinar #fallback
      - mhevery #fallback

  forms:
    conditions:
      files:
        - "packages/forms/*"
        - "aio/content/guide/forms.md"
        - "aio/content/examples/forms/*"
        - "aio/content/images/guide/forms/*"
        - "aio/content/guide/forms-overview.md"
        - "aio/content/examples/forms-overview/*"
        - "aio/content/images/guide/forms-overview/*"
        - "aio/content/guide/form-validation.md"
        - "aio/content/examples/form-validation/*"
        - "aio/content/images/guide/form-validation/*"
        - "aio/content/guide/dynamic-form.md"
        - "aio/content/examples/dynamic-form/*"
        - "aio/content/images/guide/dynamic-form/*"
        - "aio/content/guide/reactive-forms.md"
        - "aio/content/examples/reactive-forms/*"
        - "aio/content/images/guide/reactive-forms/*"
    users:
      - kara #primary
      - IgorMinar #fallback
      - mhevery #fallback
      - jenniferfell #docs only

  http:
    conditions:
      files:
        - "packages/common/http/*"
        - "packages/http/*"
        - "aio/content/guide/http.md"
        - "aio/content/examples/http/*"
        - "aio/content/images/guide/http/*"
    users:
      - alxhub #primary
      - IgorMinar
      - mhevery #fallback
      - jenniferfell #docs only

  language-service:
    conditions:
      files:
        - "packages/language-service/*"
        - "aio/content/guide/language-service.md"
        - "aio/content/images/guide/language-service/*"
    users:
      - kyliau #primary
      # needs secondary
      - IgorMinar #fallback
      - mhevery #fallback
      - jenniferfell #docs only

  router:
    conditions:
      files:
        - "packages/router/*"
        - "aio/content/guide/router.md"
        - "aio/content/examples/router/*"
        - "aio/content/images/guide/router/*"
    users:
      - jasonaden #primary
      - IgorMinar #fallback
      - mhevery #fallback
      - jenniferfell #docs only

  testing:
    conditions:
      files:
        - "*/testing/*"
        - "aio/content/guide/testing.md"
        - "aio/content/examples/testing/*"
        - "aio/content/images/guide/testing/*"
    users:
      - vikerman
      - IgorMinar #fallback
      - mhevery #fallback
      - jenniferfell #docs only

  upgrade:
    conditions:
      files:
        - "packages/upgrade/*"
        - "aio/content/guide/upgrade.md"
        - "aio/content/examples/upgrade-module/*"
        - "aio/content/images/guide/upgrade/*"
        - "aio/content/examples/upgrade-phonecat-1-typescript/*"
        - "aio/content/examples/upgrade-phonecat-2-hybrid/*"
        - "aio/content/examples/upgrade-phonecat-3-final/*"
        - "aio/content/guide/upgrade-performance.md"
        - "aio/content/guide/ajs-quick-reference.md"
        - "aio/content/examples/ajs-quick-reference/*"
    users:
      - petebacondarwin #primary
      - gkalpak
      - IgorMinar #fallback
      - mhevery #fallback
      - jenniferfell #docs only

  platform-browser:
    conditions:
      files:
        - "packages/platform-browser/*"
    users:
      - mhevery #primary
      # needs secondary
      - IgorMinar #fallback

  platform-server:
    conditions:
      files:
        - "packages/platform-server/*"
        - "aio/content/guide/universal.md"
        - "aio/content/examples/universal/*"
    users:
      - vikerman #primary
      - alxhub #secondary
      - IgorMinar #fallback
      - mhevery #fallback
      - jenniferfell #docs only

  platform-webworker:
    conditions:
      files:
        - "packages/platform-webworker/*"
    users:
      - mhevery #primary
      # needs secondary
      - IgorMinar #fallback

  service-worker:
    conditions:
      files:
        - "packages/service-worker/*"
        - "aio/content/guide/service-worker-getting-started.md"
        - "aio/content/examples/service-worker-getting-started/*"
        - "aio/content/guide/service-worker-communications.md"
        - "aio/content/guide/service-worker-config.md"
        - "aio/content/guide/service-worker-devops.md"
        - "aio/content/guide/service-worker-intro.md"
        - "aio/content/images/guide/service-worker/*"
    users:
      - gkalpak #primary
      - alxhub
      - IgorMinar
      - mhevery #fallback
      - jenniferfell #docs only

  elements:
    conditions:
      files:
        - "packages/elements/*"
        - "aio/content/examples/elements/*"
        - "aio/content/images/guide/elements/*"
        - "aio/content/guide/elements.md"
    users:
      - andrewseguin #primary
      - gkalpak
      - robwormald
      - IgorMinar #fallback
      - mhevery #fallback
      - jenniferfell #docs only

  benchpress:
    conditions:
      files:
        - "packages/benchpress/*"
    users:
      - alxhub # primary
      # needs secondary
      - IgorMinar #fallback
      - mhevery #fallback

  docs-infra:
    conditions:
      files:
        include:
          - "aio/*"
        exclude:
          - "aio/content/*"
    users:
      - petebacondarwin #primary
      - IgorMinar
      - gkalpak
      - mhevery #fallback

  docs/guide-and-tutorial:
    conditions:
      files:
        include:
          - "aio/content/*"
        exclude:
          - "aio/content/marketing/*"
          - "aio/content/navigation.json"
          - "aio/content/license.md"
    users:
      - stephenfluin
      - jenniferfell
      - brandonroberts
      - petebacondarwin
      - gkalpak
      - IgorMinar
      - mhevery #fallback

  docs/marketing:
    conditions:
      files:
        include:
          - "aio/content/marketing/*"
          - "aio/content/images/marketing/*"
          - "aio/content/navigation.json"
          - "aio/content/license.md"
    users:
      - stephenfluin
      - petebacondarwin
      - gkalpak
      - IgorMinar
      - robwormald
      - mhevery #fallback

  docs/observables:
    conditions:
      files:
        - "aio/content/examples/observables/*"
        - "aio/content/images/guide/observables/*"
        - "aio/content/guide/observables.md"
        - "aio/content/guide/comparing-observables.md"
        - "aio/content/examples/observables-in-angular/*"
        - "aio/content/images/guide/observables-in-angular/*"
        - "aio/content/guide/observables-in-angular.md"
        - "aio/content/examples/practical-observable-usage/*"
        - "aio/content/guide/practical-observable-usage.md"
        - "aio/content/examples/rx-library/*"
        - "aio/content/guide/rx-library.md"
    users:
      - jasonaden
      - benlesh
      - IgorMinar
      - mhevery
      - jenniferfell #docs only

  docs/packaging:
    conditions:
      files:
        - "aio/content/guide/npm-packages.md"
        - "aio/content/guide/browser-support.md"
        - "aio/content/guide/typescript-configuration.md"
        - "aio/content/guide/setup-systemjs-anatomy.md"
        - "aio/content/examples/setup/*"
        - "aio/content/guide/setup.md"
        - "aio/content/guide/deployment.md"
        - "aio/content/guide/releases.md"
        - "aio/content/guide/updating.md"
    users:
      - IgorMinar #primary
      - alexeagle
      - hansl
      - mhevery #fallback
      - jenniferfell #docs only
