Branch management and pull request workflow for homebridge-smarthq with semantic versioning and beta release process
This skill guides AI assistants through the branch management and pull request workflow for the homebridge-smarthq project, ensuring proper semantic versioning and beta release processes.
The homebridge-smarthq project uses a structured branching strategy with beta releases before stable releases:
Before starting any work, verify that the issue has one of these required labels:
**If no label is present, stop and request the maintainer to add the appropriate label.**
Based on the issue label, determine the appropriate semantic version increment:
**Check for existing beta branch:**
```bash
git fetch origin
git branch -r | grep "beta-"
```
**If appropriate beta branch exists**, use it. For example:
**If no appropriate beta branch exists**, create one:
```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
```
Where `X.Y.Z` matches the target version determined in step 2.
Create your feature branch from the target beta branch:
```bash
git checkout beta-X.Y.Z
git pull origin beta-X.Y.Z
git checkout -b feature/your-feature-name
```
Or for bug fixes:
```bash
git checkout -b fix/bug-description
```
**Critical**: Always target the beta branch, never `latest` directly.
**PR checklist:**
After review and approval:
When beta is stable:
**Issue label**: `patch`
**Target version**: Current stable is 0.4.0 → target 0.4.1
**Workflow**:
```bash
git fetch origin
git branch -r | grep "beta-0.4.1"
git checkout latest
git pull origin latest
git checkout -b beta-0.4.1
git push origin beta-0.4.1
git checkout -b fix/specific-bug
git add .
git commit -m "fix: resolve specific bug"
git push origin fix/specific-bug
```
**Issue label**: `minor`
**Target version**: Current stable is 0.4.0, active beta is 0.5.0 → target 0.5.0
**Workflow**:
```bash
git checkout beta-0.5.0
git pull origin beta-0.5.0
git checkout -b feature/new-capability
git add .
git commit -m "feat: add new capability"
git push origin feature/new-capability
```
**Issue label**: `major`
**Target version**: Current beta is 0.5.0 → target 1.0.0
**Workflow**:
```bash
git checkout beta-0.5.0 # or latest, depending on base
git pull origin beta-0.5.0
git checkout -b beta-1.0.0
git push origin beta-1.0.0
git checkout -b feature/breaking-change
git add .
git commit -m "feat!: breaking API change"
git push origin feature/breaking-change
```
Before creating any PR, verify:
1. **Never target PRs directly to `latest`** - Always go through beta branch first
2. **One beta branch per version** - Don't create multiple beta branches for the same version
3. **Label before work** - Issue must have patch/minor/major label before starting
4. **Minimal scope** - Keep PRs focused on single issue/feature
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/homebridge-smarthq-branch-and-pr-workflow/raw