🔧 chore: fix skill naming and gitea actions compatibility (related to #2)
Some checks failed
CI/CD Pipeline / CI Pipeline (push) Failing after 7m12s

This commit is contained in:
2026-04-06 16:56:11 +02:00
parent a5f652fa64
commit 89f17cba7d
34 changed files with 81 additions and 16 deletions

View File

@@ -0,0 +1,32 @@
# Commit Message Template
# Type: Choose one gitmoji from the reference
# ✨ :sparkles: feat - New feature
# 🐛 :bug: fix - Bug fix
# 📝 :memo: docs - Documentation
# ♻️ :recycle: refactor - Code refactoring
# 🧪 :test_tube: test - Tests
# 🔧 :wrench: chore - Configuration
# Format: <gitmoji> <type>: <description>
# Example: ✨ feat: implement BDD testing framework
# First line (50 chars max):
# Body (optional - explain what and why, not how):
# - Change 1
# - Change 2
# - Change 3
# Footer (optional - references, breaking changes):
# Issue references (choose one format):
# - closes #<issue> (when issue is fully resolved)
# - fixes #<issue> (when fixing a bug)
# - resolves #<issue> (when resolving an issue)
# - related to #<issue> (when work is related)
# - see #<issue> (when referencing for context)
#
# Example: closes #2
# Breaking: <description>
# Generated by Mistral Vibe.
# Co-Authored-By: Mistral Vibe <vibe@mistral.ai>

View File

@@ -0,0 +1,67 @@
# Git Hooks for DanceLessonsCoach
This directory contains Git hooks for the DanceLessonsCoach 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

View File

@@ -0,0 +1,50 @@
#!/bin/sh
# DanceLessonsCoach pre-commit hook
# Runs go mod tidy, go fmt, and suggests issue references before allowing commits
echo "Running pre-commit hooks..."
# Suggest issue references first (before any changes)
if [ -f ".vibe/skills/commit_message/scripts/suggest-issue-reference.sh" ]; then
echo "Checking for relevant issues..."
./.vibe/skills/commit_message/scripts/suggest-issue-reference.sh || true
echo ""
fi
# Check if we're in a Go project
if [ ! -f "go.mod" ]; then
echo "Not a Go project, skipping Go-specific hooks"
exit 0
fi
# Run go mod tidy
echo "Running go mod tidy..."
go mod tidy
if [ $? -ne 0 ]; then
echo "ERROR: go mod tidy failed"
exit 1
fi
# Check if go.mod or go.sum were modified
if git diff --cached --name-only | grep -qE '(go\.mod|go\.sum)'; then
echo "go.mod or go.sum changed, adding to commit..."
git add go.mod go.sum
fi
# Run go fmt on staged Go files only
echo "Running go fmt on staged files..."
STAGED_GOFILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\.go$')
if [ -n "$STAGED_GOFILES" ]; then
gofmt -w $STAGED_GOFILES
if [ $? -ne 0 ]; then
echo "ERROR: go fmt failed"
exit 1
fi
# Add formatted files to commit
git add $STAGED_GOFILES
fi
echo "Pre-commit hooks completed successfully"
exit 0

View File

@@ -0,0 +1,41 @@
# Gitmoji Cheatsheet
## Quick Reference
### Most Common
-`:sparkles:` - New feature
- 🐛 `:bug:` - Bug fix
- 📝 `:memo:` - Documentation
- ♻️ `:recycle:` - Refactoring
- 🧪 `:test_tube:` - Tests
- 🔧 `:wrench:` - Configuration
### All Gitmoji
| Emoji | Code | Type | Description |
|-------|------|------|-------------|
| ✨ | `:sparkles:` | feat | New feature |
| 🐛 | `:bug:` | fix | Bug fix |
| 📝 | `:memo:` | docs | Documentation |
| 🎨 | `:art:` | style | Code formatting |
| 🔧 | `:wrench:` | chore | Build/config changes |
| ♻️ | `:recycle:` | refactor | Code refactoring |
| 🚀 | `:rocket:` | perf | Performance improvements |
| 🔒 | `:lock:` | security | Security fixes |
| 📦 | `:package:` | dependencies | Dependency changes |
| 🔥 | `:fire:` | remove | Remove code/files |
| 🐧 | `:penguin:` | linux | Linux-specific changes |
| 🍎 | `:apple:` | macos | macOS-specific changes |
| 🪟 | `:window:` | windows | Windows-specific changes |
| 🤖 | `:robot:` | ci | CI/CD changes |
| 🧪 | `:test_tube:` | test | Tests |
| 📈 | `:chart_with_upwards_trend:` | analytics | Analytics/SEO |
| 🌐 | `:globe_with_meridians:` | i18n | Internationalization |
| ⚡ | `:zap:` | performance | Performance improvements |
## Usage Tips
1. **Keep it simple**: Use the most specific gitmoji that fits
2. **Be consistent**: Use the same gitmoji for similar changes
3. **First line only**: Gitmoji goes in the first line of commit message
4. **One gitmoji per commit**: Focus on the primary change type