Pull Request Workflow
Before Creating a PR
Ensure your code meets all quality standards:Creating a Pull Request
- Create a feature branch with the naming convention
<initials>-<feature>:
- Make your changes following the code style guidelines
- Commit your changes with clear, descriptive messages:
- Push to your branch:
- Open a pull request on GitHub with:
- Clear title describing the change
- Detailed description of what was changed and why
- Reference to any related issues
- Screenshots or demos if UI changes are involved
Pull Request Template
Use this template for your PR description:Review Process
Reviewing Pull Requests
When reviewing a pull request, the goal is to suggest useful changes to the author. Reviews should finish with approval unless issues would result in:What Should NOT Block a PR
Reviews may not be used as an effective veto for a PR because:- There exists a somewhat cleaner/better/faster way of accomplishing the same feature/fix
- It doesn’t fit well with some contributors’ longer-term vision for the project
Approval and Merge Criteria
Requirements before merging:
- CI has finished successfully
- At least one non-author contributor has reviewed the PR
- All review comments have been addressed
- No force pushes or Git history modifications
Fast-Track Merging
A pull request with no large change to logic that is an urgent fix may be merged after a non-author contributor has reviewed it well.Standard Merging
No PR should be merged until:- All reviews’ comments are addressed
- CI passes successfully
- Appropriate approvals are received
Git Best Practices
Commit Messages
Write clear, descriptive commit messages:No Force Pushes
Branch Management
Keep your feature branch up to date with master:Versioning
SubWallet Extension uses semantic versioning with two release tracks:Development Versions
Development versions are automatically generated by GitHub Actions:- Format:
x.y.z-nn(e.g.,1.2.3-45) - Generated on each commit to master
- Used for testing and internal builds
- No manual intervention required
Stable Versions
Stable versions require manual updates:- Update version in the main
package.json:
x.y.z-nn to x.y.z (remove the -nn suffix).
- Update CHANGELOG.md with all changes since the last stable release:
- Commit the version changes:
- GitHub Actions will automatically generate version files for each package
Semantic Versioning Guidelines
Follow Semantic Versioning 2.0.0:- MAJOR (
x.0.0): Incompatible API changes - MINOR (
0.x.0): Add functionality in a backward-compatible manner - PATCH (
0.0.x): Backward-compatible bug fixes
Changelog Updates
Format
The CHANGELOG.md follows the Keep a Changelog format:When to Update
Update CHANGELOG.md when preparing a stable release. Development versions do not require changelog updates.
- New features
- Bug fixes
- Breaking changes
- Deprecations
- Security updates
- Important refactorings
- Internal refactorings that don’t affect users
- Documentation updates (unless significant)
- Development dependency updates
- Minor code style changes
CI/CD Pipeline
Continuous Integration
GitHub Actions automatically runs on every pull request:- Lint Check: Runs
yarn lint - Type Check: Validates TypeScript types
- Tests: Runs
yarn test - Build: Compiles the extension
Pre-Merge Requirements
All checks must pass:- ✅ Lint check
- ✅ Type check
- ✅ Tests
- ✅ Build
Release Process
Declaring formal releases remains the prerogative of the project maintainers.
Release Checklist
For maintainers preparing a stable release:-
Ensure all PRs are merged
- All planned features are complete
- All bug fixes are included
- CI is green on master
-
Update version and changelog
- Bump version in
package.json - Update
CHANGELOG.mdwith all changes - Commit changes:
git commit -m "Bump version to x.y.z"
- Bump version in
-
Create a tag
-
GitHub Actions will
- Generate version files for all packages
- Build the extension
- Create a GitHub release
- Upload build artifacts
-
Post-release
- Update documentation if needed
- Announce the release
- Monitor for critical issues
Common Issues
PR Conflicts
If your PR has conflicts with master:Failed CI Checks
Lint failures:Getting Help
If you need help with the pull request process:- Check existing PRs for examples
- Review the contribution guidelines
- Ask questions in the PR comments
- Reach out to maintainers for guidance