require-valid-repository-hook-events
Require repository hook configuration files to use supported hook event names.
Rule catalog ID: R059
Targeted pattern scopeâ
.github/hooks/**/*.json
What this rule reportsâ
- unsupported hook event names inside the top-level
hooksobject
Why this rule existsâ
Repository hooks only run for a fixed set of documented lifecycle events. Rejecting unknown event names helps catch typos and prevents configuration from silently doing nothing.
â Incorrectâ
{ "version": 1, "hooks": { "beforeAnything": [] } }
â Correctâ
{ "version": 1, "hooks": { "sessionStart": [] } }