|
| 1 | +Analyze staged files and codes and add commit message. Please refer following git commit message guideline. |
| 2 | + |
| 3 | +--- |
| 4 | +inclusion: always |
| 5 | +--- |
| 6 | + |
| 7 | +# Git Commit Standards |
| 8 | + |
| 9 | +## Commit Message Format |
| 10 | + |
| 11 | +**Required Format**: `<gitmoji> <English commit message>` |
| 12 | + |
| 13 | +All commit messages must use gitmoji followed by English description in present tense, under 50 |
| 14 | +characters. |
| 15 | + |
| 16 | +## Essential Gitmoji Reference |
| 17 | + |
| 18 | +| Gitmoji | Usage | Example | |
| 19 | +| ------- | ------------------------------ | ------------------------------------- | |
| 20 | +| 🎉 | Project/feature initialization | `🎉 Initialize health check module` | |
| 21 | +| ✨ | New features | `✨ Add user authentication API` | |
| 22 | +| 🐛 | Bug fixes | `🐛 Fix health check response error` | |
| 23 | +| 📝 | Documentation | `📝 Update API documentation` | |
| 24 | +| 🎨 | Code structure/formatting | `🎨 Refactor controller code` | |
| 25 | +| ⚡ | Performance improvements | `⚡ Optimize database queries` | |
| 26 | +| ✅ | Tests | `✅ Add |
| 27 | + health check unit tests` | |
| 28 | +| 🔧 | Configuration | `🔧 Update ESLint configuration` | |
| 29 | +| 🔒 | Security fixes | `🔒 Fix authentication vulnerability` | |
| 30 | +| ⬆️ | Dependency upgrades | `⬆️ Upgrade NestJS version` | |
| 31 | +| 🔥 | Code removal | `🔥 Remove unused service` | |
| 32 | +| 🚀 | Deployment | `🚀 Add production deployment config` | |
| 33 | + |
| 34 | +## NestJS-Specific Commit Patterns |
| 35 | + |
| 36 | +- **Controllers**: `✨ Add [module] controller [feature]` |
| 37 | +- **Services**: `✨ Implement [module] service [feature]` |
| 38 | +- **Modules**: `🎉 Create [module] module` |
| 39 | +- **DTOs**: `✨ Define [module] DTO` |
| 40 | +- **Tests**: `✅ Add [module] [test-type] tests` |
| 41 | +- **Config**: `🔧 Add [config-name] environment config` |
| 42 | +- **Guards**: `🔒 Add [module] auth guard` |
| 43 | +- **Interceptors**: `⚡ Add [module] response interceptor` |
| 44 | +- **Pipes**: `✨ Add [module] validation pipe` |
| 45 | +- **Filters**: `🐛 Add [module] exception filter` |
| 46 | + |
| 47 | +## Commit Message Guidelines |
| 48 | + |
| 49 | +- **Character limit**: 50 characters maximum |
| 50 | +- **Present tense**: Use imperative mood ("Add" not "Added") |
| 51 | +- **Be specific**: Include module/component name when applicable |
| 52 | +- **Scope clarity**: Indicate what part of the system is affected |
| 53 | +- **No periods**: Don't end commit messages with periods |
| 54 | +- **Capitalize**: First letter after gitmoji should be capitalized |
| 55 | + |
| 56 | +## Branch Naming Convention |
| 57 | + |
| 58 | +- **Feature branches**: `feature/[module]-[description]` |
| 59 | +- **Bug fixes**: `fix/[module]-[issue-description]` |
| 60 | +- **Hotfixes**: `hotfix/[critical-issue]` |
| 61 | +- **Refactoring**: `refactor/[module]-[improvement]` |
| 62 | + |
| 63 | +Examples: |
| 64 | + |
| 65 | +``` |
| 66 | +feature/health-check-endpoint |
| 67 | +fix/auth-token-validation |
| 68 | +hotfix/memory-leak-service |
| 69 | +refactor/user-service-cleanup |
| 70 | +``` |
| 71 | + |
| 72 | +## Examples for This Project |
| 73 | + |
| 74 | +``` |
| 75 | +✨ Add health check controller |
| 76 | +🐛 Fix health check response status |
| 77 | +📝 Add health check API documentation |
| 78 | +✅ Add health controller unit tests |
| 79 | +🔧 Configure Jest test environment |
| 80 | +🎉 Initialize NestJS application |
| 81 | +🔒 Add health check auth guard |
| 82 | +⚡ Optimize health check response time |
| 83 | +``` |
0 commit comments