Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .github/dependabot.yml

This file was deleted.

22 changes: 6 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,26 +113,16 @@ jobs:
# Steps after this point should only run when publishing
# Include them here to avoid exporting the Docker container as an artifact
#

- name: Login to Docker Hub
if: ${{ github.event_name == 'push' || github.event_name == 'release' }}
uses: docker/login-action@v4
- name: Login to GCR
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Push snapshot image to Docker Hub
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
run: ./godelw docker push --tags=snapshot
registry: gcr.io
username: _json_key
password: ${{ secrets.GCR_JSON_KEY }}

- name: Push release image to Docker Hub
if: ${{ github.event_name == 'release' }}
- name: Push release image to gcr
run: ./godelw docker push --tags=latest,version

- name: Publish release assets
if: ${{ github.event_name == 'release' }}
run: ./godelw publish github --add-v-prefix --api-url=${GITHUB_API_URL} --user=palantir --repository=policy-bot --token=${{ secrets.GITHUB_TOKEN }}

ci-all:
runs-on: ubuntu-latest
if: ${{ !cancelled() }}
Expand Down
49 changes: 0 additions & 49 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ gotest.out

# default config location
config/policy-bot.yml
.opencode

.claude/settings.local.json
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,12 @@ requires:
organizations: ["org1", "org2"]
teams: ["org1/team1", "org2/team2"]

# If true, the codeowners of the changed files (as defined in the
# repository's CODEOWNERS file) are considered valid approvers. The
# CODEOWNERS file is read from .github/CODEOWNERS, CODEOWNERS, or
# docs/CODEOWNERS in the repository.
codeowners: true

# A user must have at least the minimum permission in this list for their
# approval to count for this rule. Valid permissions are "admin", "maintain",
# "write", "triage", and "read".
Expand Down
13 changes: 13 additions & 0 deletions config/policy-examples/codeowners-approval.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This policy requires at least one approval from a codeowner of the
# changed files. Codeowners are determined from the repository's
# CODEOWNERS file (.github/CODEOWNERS, CODEOWNERS, or docs/CODEOWNERS).

policy:
approval:
- a codeowner has approved

approval_rules:
- name: a codeowner has approved
requires:
count: 1
codeowners: true
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ require (
github.com/google/go-github/v82 v82.0.0
github.com/google/go-querystring v1.2.0
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
github.com/hairyhenderson/go-codeowners v0.7.0
github.com/hashicorp/golang-lru v1.0.2
github.com/palantir/go-baseapp v0.6.0
github.com/palantir/go-githubapp v0.41.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfh
github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU=
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA=
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/hairyhenderson/go-codeowners v0.7.0 h1:s0W4wF8bdsBEjTWzwzSlsatSthWtTAF2xLgo4a4RwAo=
github.com/hairyhenderson/go-codeowners v0.7.0/go.mod h1:wUlNgQ3QjqC4z8DnM5nnCYVq/icpqXJyJOukKx5U8/Q=
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
Expand Down
8 changes: 3 additions & 5 deletions godel/config/dist-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ products:
build:
output-dir: build
main-pkg: .
version-var: github.com/palantir/policy-bot/version.version
version-var: develop.version
environment:
CGO_ENABLED: "0"
os-archs:
Expand Down Expand Up @@ -41,8 +41,6 @@ products:
cp -R docker/* ${CONTEXT_DIR}
cp -R config ${CONTEXT_DIR}
tag-templates:
version: "{{Repository}}palantirtechnologies/policy-bot:{{Version}}"
latest: "{{Repository}}palantirtechnologies/policy-bot:latest"
snapshot: "{{Repository}}palantirtechnologies/policy-bot:snapshot"
version: "{{Repository}}us-central1-docker.pkg.dev/gcp-motion-mgmt/external/policy-bot:{{Version}}"
publish:
group-id: com.palantir.policy-bot
group-id: com.palantir.policy-bo22838
Loading
Loading