diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ba1b710..085bde5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,20 +16,21 @@ Thank you for considering a contribution! ## Branch Model -PixelHub uses a simple branch model. `main` is stable and deployable; all work happens on short-lived branches off `main`. +PixelHub uses GitFlow. `develop` is integration branch; `main` is stable and deployable; all work happens on short-lived branches off `develop`. | Branch | Purpose | Merges into | |--------|---------|-------------| | `main` | Stable. Every push of code builds and publishes images. | (release target) | -| `feat/*` | New features. Branch from `main`. | `main` via PR | -| `fix/*` | Bug fixes. Branch from `main`. | `main` via PR | -| `docs/*` | Documentation only. | `main` via PR | -| `chore/*` | Deps, CI, tooling. | `main` via PR | -| `refactor/*` | Restructure with no behavior change. | `main` via PR | +| `develop` | Integration branch. Topic branches merge here first. | `main` via release PR | +| `feat/*` | New features. Branch from `develop`. | `develop` via PR | +| `fix/*` | Bug fixes. Branch from `develop`. | `develop` via PR | +| `docs/*` | Documentation only. | `develop` via PR | +| `chore/*` | Deps, CI, tooling. | `develop` via PR | +| `refactor/*` | Restructure with no behavior change. | `develop` via PR | ```bash -# 1. Start from an up-to-date main -git checkout main && git pull origin main +# 1. Start from an up-to-date develop +git checkout develop && git pull origin develop # 2. Create your branch git checkout -b feat/private-zones @@ -37,7 +38,7 @@ git checkout -b feat/private-zones # 3. Commit as you go (Conventional Commits) git commit -m "feat(world): add private zone tiles" -# 4. Push and open a PR into main +# 4. Push and open a PR into develop git push -u origin feat/private-zones ``` @@ -99,12 +100,13 @@ pnpm -r build # shared, server, client ## Pull Request Process -1. Branch from `main` (`feat/*`, `fix/*`, `docs/*`, ...). +1. Branch from `develop` (`feat/*`, `fix/*`, `docs/*`, ...). 2. Ensure `pnpm typecheck`, `pnpm test`, and `pnpm -r build` all pass. 3. Confirm no secrets or `.env` files are committed. -4. Open a PR targeting `main`. Assign **@mateuseap** as reviewer. +4. Open a PR targeting `develop`. Assign **@mateuseap** as reviewer. 5. Give the PR a clear title (Conventional Commits style) and a description with a **Summary** and a **Test plan**. -6. At least one maintainer review is required before merge. +6. After merge to `develop`, create release PR from `develop` to `main`. +7. At least one maintainer review is required before merge. ## Reporting Security Issues diff --git a/README.md b/README.md index af0f885..144e2d2 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ When set, the server sends each player a scoped LiveKit token after join. The cl ## Contributing -Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a PR. Branch from `main`, use Conventional Commits, keep the test suite green, and assign **@mateuseap** for review. +Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a PR. Branch from `develop`, use Conventional Commits, keep the test suite green, and assign **@mateuseap** for review on PRs into `develop`. ## Learn more