-
Notifications
You must be signed in to change notification settings - Fork 0
Add git hooks integration #9
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Feature Request: Git Hooks Integration
Problem Statement
Teams want to automatically generate context for code reviews or ensure quality before commits.
Proposed Solution
Provide git hook scripts and integration guides for automated dex usage.
Implementation Details
Hook Types
- pre-commit: Check for secrets, generate context
- prepare-commit-msg: Add context to commit messages
- pre-push: Generate PR context
- post-checkout: Brief context for branch switches
Installation
dex install-hooks # Install all hooks
dex install-hooks --pre-commit # Specific hookExample pre-commit hook
#\!/bin/bash
# Check for secrets before commit
dex --secure=block || exit 1
# Generate context for commit message
CONTEXT=$(dex --format=markdown --no-metadata)
echo "$CONTEXT" > .git/DEX_CONTEXTExample prepare-commit-msg
#\!/bin/bash
# Add AI-generated summary to commit message
SUMMARY=$(dex --format=gpt | some-ai-tool)
echo -e "\n\nAI Summary:\n$SUMMARY" >> $1Configuration
.dex-hooks.yml:
pre-commit:
secure: block
format: markdown
prepare-commit-msg:
enabled: true
ai-summary: trueBenefits
- Automated security checks
- Consistent PR descriptions
- AI-assisted commit messages
- Team workflow enforcement
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request