Skip to content
Open
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
33 changes: 33 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
- id: apm_audit
name: apm_audit
description: |
Check that apm dependencies are in sync and policy compliant.

Note: `apm` must be installed and present on `PATH`.

Note: `args` can have `--policy {apm-policy.yml}` passed to run further checks - that file can live in an org's `org/.github` repository for centralizing compliance. For that, use `--policy org`.

Comment thread
petemounce marked this conversation as resolved.
Note: `files` should include:

- apm*yml configuration files (and schema).
- toolchain manager configuration files (to trigger this when apm changes versions).
- agent configuration directories - to cause audit to detect if apm-delivered assets become modified.
entry: apm audit --ci
files: |-
(?x)^(
apm\.yml|
apm\.lock\.yaml|
apm-policy\.yml|
\.agents/.*|
\.claude/.*|
\.codex/.*|
\.cursor/.*|
\.github/agents/.*|
\.github/instructions/.*|
\.github/hooks/.*|
\.github/skills/.*|
\.opencode/.*
)$
language: system
pass_filenames: false