Skip to content

Commit

Permalink
Merge pull request #2 from palantir/excavator/policy-bot-oss
Browse files Browse the repository at this point in the history
Excavator: Update policy-bot config
  • Loading branch information
sfackler committed Oct 19, 2020
2 parents 217b646 + 98b98a3 commit 5d5e7c1
Showing 1 changed file with 101 additions and 0 deletions.
101 changes: 101 additions & 0 deletions .policy.yml
@@ -0,0 +1,101 @@
# Excavator auto-updates this file. Please contribute improvements to the central template.

policy:
approval:
- or:
- one admin has approved (PR contributors not allowed)
- two admins have approved
- changelog only and contributor approval
- fixing excavator
- excavator only touched baseline, circle, gradle files, godel files, docker-compose-rule config or versions.props
- excavator only touched config files
- bots updated package.json and lock files
disapproval:
requires:
organizations: [ "palantir" ]

approval_rules:
- name: one admin has approved (PR contributors not allowed)
options:
allow_contributor: false
requires:
count: 1
admins: true

- name: two admins have approved
options:
allow_contributor: true
requires:
count: 2
admins: true

- name: changelog only and contributor approval
options:
allow_contributor: true
requires:
count: 1
admins: true
if:
only_changed_files:
paths:
- "changelog/@unreleased/.*\\.yml"

- name: fixing excavator
options:
allow_contributor: true
requires:
count: 1
admins: true
if:
has_author_in:
users: [ "svc-excavator-bot" ]

- name: excavator only touched baseline, circle, gradle files, godel files, docker-compose-rule config or versions.props
requires:
count: 0
if:
has_author_in:
users: [ "svc-excavator-bot" ]
only_changed_files:
# product-dependencies.lock should never go here, to force review of all product (SLS) dependency changes
# this way excavator cannot change the deployability of a service or product via auto-merge
paths:
- "changelog/@unreleased/.*\\.yml"
- "^\\.baseline/.*$"
- "^\\.circleci/.*$"
- "^\\.docker-compose-rule\\.yml$"
- "^.*gradle$"
- "^gradle/wrapper/.*"
- "^gradlew$"
- "^gradlew.bat$"
- "^gradle.properties$"
- "^settings.gradle$"
- "^godelw$"
- "^godel/config/godel.properties$"
- "^godel/config/godel.yml$"
- "^versions.props$"
- "^versions.lock$"

- name: excavator only touched config files
requires:
count: 0
if:
has_author_in:
users: [ "svc-excavator-bot" ]
only_changed_files:
paths:
- "^\\..*.yml$"
- "^\\.github/.*$"

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

0 comments on commit 5d5e7c1

Please sign in to comment.