|
| 1 | +# Contributing to Timberjack |
| 2 | + |
| 3 | +Thank you for considering contributing to **Timberjack**! Please take a moment to read through these guidelines. |
| 4 | + |
| 5 | +## Guidelines |
| 6 | + |
| 7 | +- All contributions must follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0) format. |
| 8 | +- Ensure all tests pass before pushing or opening a pull request. |
| 9 | +- Document new functionality clearly in code comments and README if applicable. |
| 10 | +- Avoid unnecessary commits or unrelated changes. |
| 11 | + |
| 12 | +## Commit Message Format |
| 13 | + |
| 14 | +We follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard: |
| 15 | + |
| 16 | +``` |
| 17 | +<type>[optional scope]: <description> |
| 18 | +``` |
| 19 | +### Examples |
| 20 | + |
| 21 | +- `feat: add Rotate feature` |
| 22 | +- `fix: correct rotation timestamp logic` |
| 23 | +- `docs: update README with usage example` |
| 24 | +- `test: cover edge case for rotation overlap` |
| 25 | + |
| 26 | +### Allowed Types |
| 27 | + |
| 28 | +| Type | Use For | |
| 29 | +|-----------|-------------------------------------------------------------------------| |
| 30 | +| `feat` | A new feature | |
| 31 | +| `fix` | A bug fix | |
| 32 | +| `chore` | Build process, CI, tooling | |
| 33 | +| `docs` | Changes to documentation (README, comments) | |
| 34 | +| `test` | Adding or modifying tests | |
| 35 | +| `refactor`| Code refactoring without behavior change | |
| 36 | +| `style` | Code style changes (whitespace, etc) | |
| 37 | +| `perf` | Performance improvements | |
| 38 | +| `ci` | Changes to GitHub Actions, CI/CD workflows | |
| 39 | + |
| 40 | + |
| 41 | +## Scopes (Optional) |
| 42 | + |
| 43 | +Use a **scope** in parentheses after the type to clarify what part of the code is affected. Examples: |
| 44 | + |
| 45 | +- `fix(logger): correct timestamp handling` |
| 46 | +- `feat(rotation): add weekday scheduling` |
| 47 | +- `docs(readme): document Rotate usage` |
| 48 | + |
| 49 | +### Breaking Changes |
| 50 | + |
| 51 | +If your commit introduces a **breaking change** — something that would require users to modify their code — add a `!` immediately after the type: |
| 52 | + |
| 53 | +- `feat!: remove support for deprecated config field` |
| 54 | + |
| 55 | +This will mark the commit as a major version bump when release automation is used. |
| 56 | + |
| 57 | +### Other Guidelines |
| 58 | + |
| 59 | +- Run all tests before pushing: `go test ./...` |
| 60 | +- Keep PRs focused and self-contained |
| 61 | +- Use clear, descriptive commit messages |
| 62 | +- If you add a new feature, consider adding an example in the README. |
0 commit comments