mirror of
https://github.com/ivuorinen/actions.git
synced 2026-03-10 02:57:14 +00:00
Add auto-formatting hooks (ruff, shfmt, prettier, actionlint), rules.yml edit blocker, 5 skills (/release, /test-action, /new-action, /validate, /check-pins), and 2 subagents (action-validator, test-coverage-reviewer). Update CLAUDE.md with hook documentation.
17 lines
459 B
Bash
Executable File
17 lines
459 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
# Read JSON input from stdin to get the file path
|
|
INPUT=$(cat)
|
|
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // .tool_input.filePath // empty')
|
|
|
|
if [ -z "$FILE_PATH" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
case "$FILE_PATH" in
|
|
*/rules.yml)
|
|
echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"rules.yml files are auto-generated. Run make update-validators instead."}}'
|
|
;;
|
|
esac
|