GRM-22: Add developer documentation and update project configuration
- Add CONTRIBUTING.md with branch naming, commit format, and PR workflow - Add TROUBLESHOOTING.md with common issues and solutions - Update README.md with CI badge and commit convention section - Update pyproject.toml with pythonpath and coverage settings for scripts
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
# Contributing to GRM
|
||||
|
||||
Thank you for contributing to Gitea Runner Manager (GRM)!
|
||||
|
||||
## Branch Naming
|
||||
|
||||
All feature branches **must** include a `GRM-N` prefix corresponding to the Vikunja task identifier. Examples:
|
||||
|
||||
- `GRM-19`
|
||||
- `GRM-19-fix-bug`
|
||||
- `GRM-42-add-update-command`
|
||||
|
||||
The `GRM-N` prefix is mandatory — CI extracts it for merge messages and Vikunja updates.
|
||||
|
||||
## Commit Format
|
||||
|
||||
Use **conventional commits** on feature branches:
|
||||
|
||||
```
|
||||
feat: add new command
|
||||
fix: resolve timeout issue
|
||||
chore: update dependencies
|
||||
docs: improve README
|
||||
```
|
||||
|
||||
Allowed types: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `perf`, `test`, `ci`, `build`, `revert`, `BREAKING CHANGE`.
|
||||
|
||||
**Do NOT** include the `GRM-N:` prefix in commit messages on feature branches — it is added automatically during squash merge.
|
||||
|
||||
## PR Workflow
|
||||
|
||||
1. Create a branch `GRM-N` or `GRM-N-brief-description` from `master`
|
||||
2. Make changes, committing with conventional format
|
||||
3. Push and open a PR against `master`
|
||||
4. CI runs lint, unit tests, and molecule tests
|
||||
5. When all checks pass, add the `ready-to-merge` label
|
||||
6. The auto-merge workflow squash-merges with message `GRM-N: <PR title>`
|
||||
7. The post-merge workflow updates the Vikunja task
|
||||
|
||||
## Local Testing
|
||||
|
||||
```bash
|
||||
make test-all # Runs pytest-cov + molecule
|
||||
make lint-all # Runs ruff, pyright, ansible-lint, checkmake
|
||||
make pytest-cov # Unit tests with 100% coverage enforcement
|
||||
make molecule # All 7 molecule scenarios
|
||||
```
|
||||
|
||||
## Code Quality
|
||||
|
||||
- **ruff**: Line length 120
|
||||
- **pyright**: Strict mode
|
||||
- **Test coverage**: 100% required
|
||||
- **ansible-lint**: For all Ansible content
|
||||
Reference in New Issue
Block a user