Skill Improvements: - BDD Testing Skill: Enhanced step templates, debugging guides, and patterns - Gitea Client Skill: Added wiki management, issue tracking, and workflow monitoring - Product Owner Assistant: Improved user story workflow and documentation - Commit Message Skill: Better gitmoji integration and issue referencing - Changelog Manager: Enhanced change tracking and documentation - Skill Creator: Improved skill generation templates and validation - Swagger Documentation: Updated OpenAPI integration guides Key Features: - BDD best practices documentation - Gitea API client with wiki support - User story implementation workflow - Git commit message standardization - Skill development patterns - OpenAPI/Swagger documentation generation Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
67 lines
1.6 KiB
Markdown
67 lines
1.6 KiB
Markdown
# Git Hooks for dance-lessons-coach
|
|
|
|
This directory contains Git hooks for the dance-lessons-coach project.
|
|
|
|
## Available Hooks
|
|
|
|
### pre-commit
|
|
- **Location**: `.git/hooks/pre-commit`
|
|
- **Purpose**: Automatically runs `go mod tidy` and `go fmt` before commits
|
|
- **Features**:
|
|
- Runs `go mod tidy` to clean up dependencies
|
|
- Automatically adds modified `go.mod` and `go.sum` to commit
|
|
- Runs `go fmt` on staged Go files only
|
|
- Automatically adds formatted files to commit
|
|
- Only runs if in a Go project (checks for `go.mod`)
|
|
|
|
## Installation
|
|
|
|
The pre-commit hook is already installed and executable. No additional setup required.
|
|
|
|
## Usage
|
|
|
|
The hooks run automatically when you commit:
|
|
|
|
```bash
|
|
git add .
|
|
git commit -m "✨ feat: add new feature"
|
|
```
|
|
|
|
The hook will:
|
|
1. Run `go mod tidy`
|
|
2. Run `go fmt` on all Go files
|
|
3. Add any modified files to your commit
|
|
4. Allow the commit to proceed if successful
|
|
|
|
## Customization
|
|
|
|
To modify the hooks:
|
|
1. Edit the hook file in `.git/hooks/`
|
|
2. Make it executable: `chmod +x .git/hooks/hook-name`
|
|
|
|
## Disabling Hooks
|
|
|
|
To temporarily disable hooks:
|
|
|
|
```bash
|
|
# Skip pre-commit hook for one commit
|
|
git commit --no-verify -m "✨ feat: add new feature"
|
|
```
|
|
|
|
## Best Practices
|
|
|
|
- Let the hooks run automatically - they ensure code quality
|
|
- The hooks only modify files that need changes
|
|
- All changes are added to your commit automatically
|
|
- Hooks run quickly and prevent common issues
|
|
|
|
## Troubleshooting
|
|
|
|
If a hook fails:
|
|
- Check the error message
|
|
- Fix the issue manually
|
|
- Commit again
|
|
|
|
Common issues:
|
|
- `go mod tidy` fails: Check your Go module dependencies
|
|
- `go fmt` fails: Check for syntax errors in your Go code |