3.9 KiB
3.9 KiB
Contributing to HoopScout
This repository follows a pragmatic GitFlow model. The goal is predictable releases with low process overhead.
Branch Roles
main: production-only, always releasabledevelop: integration branch for upcoming releasefeature/*: feature work, branched fromdevelop, merged intodeveloprelease/*: stabilization branch, branched fromdevelop, merged intomainand back intodevelophotfix/*: urgent production fixes, branched frommain, merged intomainand back intodevelop
Branch Naming Convention
Use lowercase kebab-case.
feature/<scope>-<short-description>release/<major>.<minor>.<patch>hotfix/<scope>-<short-description>
Examples:
feature/search-age-height-filtersfeature/providers-mvp-retry-logicrelease/0.2.0hotfix/redis-volume-permissions
Day-to-Day Feature Workflow
- Sync
develop.
git checkout develop
git pull origin develop
- Create branch.
git checkout -b feature/your-feature-name
-
Implement, test, commit in small logical steps.
-
Rebase or merge latest
developbefore PR if needed.
git checkout develop
git pull origin develop
git checkout feature/your-feature-name
git rebase develop
- Open PR:
feature/*->develop.
Recommended Release Workflow
- Create release branch from
develop.
git checkout develop
git pull origin develop
git checkout -b release/0.1.0
- On
release/*allow only:
- bug fixes
- docs/changelog updates
- release metadata/version updates
- Validate release candidate in Docker.
docker compose up -d --build
docker compose run --rm web sh -lc 'pip install -r requirements/dev.txt && pytest -q'
- Merge
release/*intomain. - Tag release on
main(v0.1.0). - Merge the same
release/*back intodevelop. - Delete release branch after both merges.
Recommended Hotfix Workflow
- Create hotfix branch from
main.
git checkout main
git pull origin main
git checkout -b hotfix/your-hotfix-name
- Implement minimal fix and tests.
- Open PR:
hotfix/*->main. - After merge to
main, back-merge todevelop. - Tag patch release (
vX.Y.Z).
Pull Request Checklist
Before requesting review, confirm:
- Branch target is correct (
develop,main, or release back-merge) - Scope is focused (no unrelated refactors)
- Docker stack still starts (
docker compose up -d) - Tests updated and passing
- Migrations included if models changed
- Docs updated (
README,CONTRIBUTING,.env.example) when needed - No secrets or credentials committed
- Changelog entry added under
Unreleased
Issue and Feature Templates
Use repository templates in .github/ISSUE_TEMPLATE/:
bug_report.mdfeature_request.md
Use .github/PULL_REQUEST_TEMPLATE.md for PR descriptions.
Changelog / Release Note Convention
- Single changelog file:
CHANGELOG.md - Keep
Unreleasedat top - Categorize entries under:
AddedChangedFixed
- Release format:
## [0.1.0] - 2026-03-10
Repository Bootstrap Commands
Maintainers should run these once to start GitFlow from current main:
git checkout main
git pull origin main
git checkout -b develop
git push -u origin develop
Then start regular feature work:
git checkout develop
git pull origin develop
git checkout -b feature/first-team-task
Local Development Setup
cp .env.example .env
docker compose up --build
If needed:
docker compose exec web python manage.py migrate
docker compose exec web python manage.py createsuperuser
Testing Commands
Run full suite:
docker compose run --rm web sh -lc 'pip install -r requirements/dev.txt && pytest -q'
Run targeted modules while developing:
docker compose run --rm web sh -lc 'pip install -r requirements/dev.txt && pytest -q tests/test_players_views.py'