Branch Overview
| Branch | Purpose | Deploys To |
|---|---|---|
trunk | Production-ready code (primary branch, source for all new branches) | Production |
staging | Integration branch for testing | Staging Environment |
Workflow Visualization
Notice that the arrow goes from your working branch directly to trunk, not from staging to trunk.
Branch Naming Conventions
Use descriptive branch names with the appropriate prefix:| Type | Pattern | Example | Use Case |
|---|---|---|---|
| Feature | feature/short-description | feature/user-authentication | New functionality |
| Bug Fix | bugfix/short-description | bugfix/login-validation | Non-urgent fixes |
| Hotfix | hotfix/short-description | hotfix/critical-security-patch | Urgent production fixes |
Branch Naming Guidelines
- Use lowercase letters
- Use hyphens (
-) to separate words - Keep names short but descriptive
- Include ticket/issue number if applicable:
feature/123-user-auth
Examples of good branch names
Examples of good branch names
feature/block-editor-integrationbugfix/42-theme-color-overridehotfix/critical-xss-vulnerabilityfeature/rest-api-endpointsbugfix/navigation-menu-alignment
Step-by-Step Workflow
The workflow is identical for all branch types. The only difference is the branch name prefix (feature/, bugfix/, or hotfix/).
Create your branch from trunk
Always create new branches from the latest Replace
trunk:<type> with feature, bugfix, or hotfix depending on your work.Make your changes
Keep your branch updated
Regularly sync with the latest trunk changes:
Using
rebase instead of merge keeps your commit history clean and linear.Merge directly into staging (No PR required)
Deploy to staging for testing:This deploys your changes to the Staging Environment for QA testing.
Wait for QA approval
Your changes will be tested in the staging environment. The QA team will review:
- Functionality works as expected
- No regressions introduced
- Meets acceptance criteria
- Performance is acceptable
Visual Flow Diagram
Pull Request Process
Pull Requests are only required when merging to
trunk. You can merge directly to staging without a PR.Before Submitting a PR to Trunk
Ensure your checklist is complete:- Code has been tested in the staging environment
- QA has approved the changes
- Code follows project style guidelines
- All tests pass locally
- Branch is up to date with
trunk - Commit messages are clear and descriptive
- Documentation is updated (if applicable)
PR Requirements
Write a clear title
Use a descriptive title that summarizes the change:
- “Add REST API endpoints for custom post types”
- “Fix navigation menu alignment on mobile devices”
- “Update block editor integration for WordPress 6.9”
Provide detailed description
Explain:
- What changes were made
- Why they were necessary
- How to test the changes
- Any breaking changes or migration steps
Request reviewers
Request at least one reviewer who is familiar with the area of code you’re changing.
Merge Strategy
| Target Branch | Method | PR Required |
|---|---|---|
staging | Direct merge | ❌ No |
trunk | Merge commit | ✅ Yes |
What NOT To Do
| Action | Why It’s Wrong |
|---|---|
Merge staging into trunk | staging may contain untested or unapproved code |
Create branches from staging | staging is not the source of truth |
Skip testing in staging | Changes must be tested before production |
Merge to trunk before QA approval | Untested code could reach production |
Open a PR to staging | Direct merges are preferred for staging |
Quick Reference
Branch Rules Summary
| Rule | Description |
|---|---|
| Create from | Always create branches from trunk |
| Staging merge | Direct merge (no PR required) |
| Trunk merge | Pull Request required |
| Never | Never merge staging into trunk |
| Never | Never create branches from staging |
Deployment
The project uses GitHub Actions to automatically deploy vendor folders:- Workflow file:
.github/workflows/deploy-vendors.yml - Triggers on every push to
trunkorstaging - Can be triggered manually via GitHub Actions UI
| Branch | Environment |
|---|---|
trunk | production |
staging | staging |
How deployment works
How deployment works
The workflow:
- Runs
composer install --no-devfor each plugin/theme - Uploads the
vendor/folder to the appropriate environment - Uses GitHub Environments to separate production and staging credentials
- Deploys via SFTP to WordPress.com hosting
Questions?
If you have questions about the workflow:Open an Issue
Open an issue with the
question label for workflow questions.Contact Maintainers
Reach out to the maintainers for clarification.
