This repository was archived by the owner on Aug 7, 2026. It is now read-only.
fix(backport): auto-verify hardening + quality-of-life improvements @… #157
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Validate Hooks | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| validate-json: | |
| name: Validate settings.json | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Validate settings.json | |
| run: python3 -m json.tool settings.json > /dev/null | |
| shellcheck: | |
| name: Lint hook scripts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Install shellcheck | |
| run: sudo apt-get install -y shellcheck | |
| - name: Run shellcheck on all hooks | |
| run: | | |
| failed=0 | |
| for script in hooks/*.sh; do | |
| echo "--- Checking $script ---" | |
| if ! shellcheck -e SC2034,SC1091,SC2002,SC2012,SC2015,SC2126,SC2317,SC2329 "$script"; then | |
| failed=1 | |
| fi | |
| done | |
| exit $failed | |
| hook-contracts: | |
| name: Validate hook contracts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Install jq | |
| run: sudo apt-get install -y jq | |
| - name: Run hook contract tests | |
| run: bash tests/run-hooks.sh |