<commit_before>policy:
  approval:
    - or:
      - infra team approval
      - infra team co-approval
      - excavator only touched gradle files or versions.props
      - excavator only touched package.json and lock files

approval_rules:

  - name: infra team approval
    requires:
      count: 1
      teams:
        - "palantir/infrastructure"

  # Require two *contributing* infra maintainers to approve changes
  - name: infra team co-approval
    options:
      allow_contributor: true
    requires:
      count: 2
      teams:
        - "palantir/infrastructure"

  - name: excavator only touched gradle files or versions.props
    requires:
      count: 0
    if:
      has_author_in:
        users: [ "svc-excavator-bot" ]
      only_changed_files:
        paths:
          - "^.*gradle$"
          - "^gradle/wrapper/.*"
          - "^gradlew$"
          - "^gradlew.bat$"
          - "^versions.props$"
          - "^versions.lock$"

  - name: excavator only touched package.json and lock files
    requires:
      count: 0
    if:
      has_author_in:
        users: [ "svc-excavator-bot" ]
      only_changed_files:
        paths:
          - "^.*yarn.lock$"
          - "^.*package.json$"
<commit_msg>Excavator: Update policy-bot config (#362)<commit_after>policy:
  approval:
    - or:
      - infra team approval
      - infra team co-approval
      - excavator only touched baseline, gradle files or versions.props
      - excavator only touched package.json and lock files
  disapproval:
    requires:
      organizations: [ "palantir" ]

approval_rules:
  - name: infra team approval
    requires:
      count: 1
      teams:
        - "palantir/infrastructure"

  # Require two *contributing* infra maintainers to approve changes
  - name: infra team co-approval
    options:
      allow_contributor: true
    requires:
      count: 2
      teams:
        - "palantir/infrastructure"

  - name: excavator only touched baseline, gradle files or versions.props
    requires:
      count: 0
    if:
      has_author_in:
        users: [ "svc-excavator-bot" ]
      only_changed_files:
        paths:
          - "^\\.baseline/.*$"
          - "^.*gradle$"
          - "^gradle/wrapper/.*"
          - "^gradlew$"
          - "^gradlew.bat$"
          - "^versions.props$"
          - "^versions.lock$"

  - name: excavator only touched package.json and lock files
    requires:
      count: 0
    if:
      has_author_in:
        users: [ "svc-excavator-bot" ]
      only_changed_files:
        paths:
          - "^.*yarn.lock$"
          - "^.*package.json$"

{'fraction_non_alphanumeric': 0.10650658404337723, 'fraction_numerical': 0.004260263361735089, 'mean_word_length': 1.8731924360400445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7093212', 'n_tokens_mistral': 853, 'n_tokens_neox': 789, 'n_words': 201}