Skip to content

feat: add hooks example with lint-check post-write hook#1

Open
danielmeppiel wants to merge 1 commit intomainfrom
feat/add-hooks-example
Open

feat: add hooks example with lint-check post-write hook#1
danielmeppiel wants to merge 1 commit intomainfrom
feat/add-hooks-example

Conversation

@danielmeppiel
Copy link
Collaborator

Adds a hooks/ directory with a sample PostToolUse hook that triggers after file-write tools (write_to_file, create_file, edit_file). Includes a bundled lint-changed.sh script as a realistic example.

Adds a hooks/ directory with a sample PostToolUse hook that triggers
after file-write tools (write_to_file, create_file, edit_file).
Includes a bundled lint-changed.sh script as a realistic example.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a hooks/ directory to the APM sample package, providing an example PostToolUse hook that runs after file-write tools and calls a bundled script to emit a “lint reminder” message.

Changes:

  • Added hooks/hooks.json defining a PostToolUse hook matcher for file-write tools.
  • Added hooks/scripts/lint-changed.sh, a sample post-write hook script that reports the modified file path.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
hooks/scripts/lint-changed.sh Adds a minimal post-write hook script that reads the tool input path and prints a reminder message.
hooks/hooks.json Registers a PostToolUse command hook to invoke the bundled script after write-related tools.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants