mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-20 10:25:13 +00:00
- Introduced hooks to enable automated workflows triggered by specific events during GitHub Copilot sessions. - Added documentation for hooks in AGENTS.md and README.md. - Created a new directory structure for hooks, including README.md and hooks.json files. - Implemented two example hooks: Session Auto-Commit and Session Logger. - Developed scripts for logging session events and auto-committing changes. - Enhanced validation and parsing for hook metadata. - Updated build and validation scripts to accommodate new hooks functionality.
1.6 KiB
1.6 KiB
name, description, tags
| name | description | tags | |||
|---|---|---|---|---|---|
| Session Logger | Logs all Copilot coding agent session activity for audit and analysis |
|
Session Logger Hook
Comprehensive logging for GitHub Copilot coding agent sessions, tracking session starts, ends, and user prompts for audit trails and usage analytics.
Overview
This hook provides detailed logging of Copilot coding agent activity:
- Session start/end times
- User prompts and questions
- Session duration
- Working directory context
Features
- Complete Audit Trail: Track all Copilot interactions
- Structured Logging: JSON format for easy parsing
- Searchable History: Review past sessions and prompts
- Analytics Ready: Export data for usage analysis
- Privacy Aware: Configurable to exclude sensitive data
Installation
-
Copy this hook folder to your repository's
.github/hooks/directory:cp -r hooks/session-logger .github/hooks/ -
Create the logs directory:
mkdir -p logs/copilot -
Ensure scripts are executable:
chmod +x .github/hooks/session-logger/*.sh -
Commit the hook configuration to your repository's default branch
Log Format
Logs are written to logs/copilot/session.log in JSON format:
{
"timestamp": "2024-01-15T10:30:00Z",
"event": "sessionStart",
"sessionId": "abc123",
"cwd": "/workspace/project"
}
Privacy & Security
- Add
logs/to.gitignoreto avoid committing session data - Use
LOG_LEVEL=ERRORto only log errors - Set
SKIP_LOGGING=trueenvironment variable to disable - Logs are stored locally only