Files
homelab-ansible/CONVENTIONS.md

52 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Git Conventions
## Branch Naming
```
<type>/<short-kebab-case-description>
```
- All lowercase, hyphens only
- Keep the description short (3–5 words)
- No ticket tracker is used, so branch names don't carry an ID
| Type | Use for |
|---|---|
| `feature/` | New functionality (e.g. a new role, a newly adopted stack) |
| `bug/` | Bug fixes |
| `enhancement/` | Improvements or refactors to existing functionality, no new capability |
| `chore/` | Dependency bumps, tooling, CI/CD, cleanup |
| `docs/` | Documentation only |
**Examples:** `feature/adopt-uptime-kuma-stack`, `bug/fix-stack-health-check`, `chore/pin-ansible-lint`
---
## Commit Messages
```
<type>(<scope>): <imperative, present-tense summary>
<optional body: explain WHY, not WHAT>
```
- **Type**: same list as the branch types above
- **Scope**: optional. The allowed values are defined in `.githooks/commit-msg`, which enforces them
- **Summary**: imperative mood ("add", not "added" or "adds"), no period at the end
- **Body**: only when the reasoning isn't obvious from the diff
---
## Pull Request Titles
Gitea's merge commit reuses the PR title as its summary, so the title should stand on its own in `git log`. Describe the outcome:
```
<Type>: <what changes for the homelab>
```
**Examples:**
- `Feature: Deploy Uptime Kuma through Ansible`
- `Bug: Fix health check for stacks without a published port`
- `Chore: Add secret scan and lint checks`