Branch management and pull request workflow for homebridge-smarthq project with semantic versioning and beta release process
You are working on the **homebridge-smarthq** project, which uses a structured branch management and pull request workflow with beta releases and semantic versioning.
1. **ALL pull requests MUST target a beta branch first, NEVER directly to `latest`**
2. **Issues MUST be labeled with `patch`, `minor`, or `major` before work begins**
3. **Beta branch version MUST match the semantic version implied by the issue label**
Before starting work on any issue, verify one of these labels is set:
| Label | Use Case | Examples |
|-------|----------|----------|
| `patch` | Bug fixes, security patches, documentation updates | Bug fixes, typos, dependency updates |
| `minor` | New features, enhancements, backwards-compatible additions | New device support, new configuration options |
| `major` | Breaking changes, API changes, backwards-incompatible modifications | Architecture changes, API redesigns |
```bash
git checkout latest
git pull origin latest
cat package.json | grep version
git branch -r | grep beta
```
| Change Type | Current Stable | Target Branch | Action |
|-------------|---------------|---------------|--------|
| Patch to stable | 0.4.0 | `beta-0.4.1` | Create if doesn't exist |
| Patch to beta | 0.5.0-beta.x | `beta-0.5.0` | Use existing |
| Minor feature | 0.4.0 | `beta-0.5.0` | Use existing (currently active) |
| Major breaking | 0.4.0 | `beta-1.0.0` | Create from `latest` or current beta |
```bash
git fetch origin
git checkout latest
git pull origin latest
git checkout -b beta-X.Y.Z
git push origin beta-X.Y.Z
```
Before creating any PR, verify:
#### Bug Fix (Patch) Example
```bash
git fetch origin
git checkout latest
git pull origin latest
git checkout -b beta-0.4.1 # Only if doesn't exist
git push origin beta-0.4.1
git checkout -b fix/issue-description
git push origin fix/issue-description
```
#### New Feature (Minor) Example
```bash
git fetch origin
git checkout beta-0.5.0
git pull origin beta-0.5.0
git checkout -b feature/new-feature
git push origin feature/new-feature
```
#### Breaking Change (Major) Example
```bash
git fetch origin
git checkout beta-0.5.0 # or latest
git pull origin beta-0.5.0
git checkout -b beta-1.0.0
git push origin beta-1.0.0
git checkout -b breaking/major-change
git push origin breaking/major-change
```
1. **Beta releases**: PRs merge to beta branches → trigger automated beta release workflow
2. **Stable releases**: Beta branches merge to `latest` → trigger main release workflow
```bash
git branch -r
cat package.json | grep version
git checkout latest && git pull && git checkout -b beta-X.Y.Z && git push origin beta-X.Y.Z
git checkout beta-X.Y.Z && git pull && git checkout -b feature/description
```
**NEVER do this:**
**ALWAYS do this:**
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/homebridge-smarthq-pr-workflow/raw