mirror of
https://github.com/github/awesome-copilot.git
synced 2026-03-15 13:45:12 +00:00
fix: align hooks docs with official GitHub Copilot hooks spec
- Remove non-existent copilotAgentCommit event from all articles - Add 5 missing hook events: preToolUse, postToolUse, agentStop, subagentStop, errorOccurred - Fix hooks location from .copilot/hooks.json to .github/hooks/*.json - Add powershell field to config format - Add preToolUse security gating example (approve/deny tool executions) - Update glossary and coding agent article cross-references Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -208,7 +208,9 @@ The agent will read your feedback, make changes, and push new commits to the sam
|
||||
|
||||
Hooks are especially valuable with the coding agent because they provide deterministic guardrails for autonomous work:
|
||||
|
||||
- **`copilotAgentCommit`**: Format code, run linters, and validate changes before every commit the agent makes
|
||||
- **`preToolUse`**: Approve or deny tool executions — block dangerous commands and enforce security policies
|
||||
- **`postToolUse`**: Format code, run linters, and validate changes after edits
|
||||
- **`agentStop`**: Run final checks (e.g., full lint pass) when the agent finishes responding
|
||||
- **`sessionStart`**: Log the start of autonomous sessions for governance
|
||||
- **`sessionEnd`**: Send notifications when the agent finishes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user