This guide helps you migrate your existing PR to meet the new PR management system requirements.
While your existing PR will still be reviewed and merged under current standards, migrating it to the new format gives you:
✅ Faster reviews - Automated checks catch issues early ✅ Better feedback - Clear, actionable feedback from CI ✅ Higher quality - Consistent code standards ✅ Learning - Understand our new contribution workflow
# Run the PR health check (reads only, doesn't modify anything)
./scripts/pr-check.shThis will analyze your PR and tell you:
- ✅ What's good
⚠️ What needs attention- 💡 How to fix issues
- 📊 Overall health score
Based on the suggestions, fix the issues manually. Common fixes:
# Rebase on latest dev
git fetch upstream && git rebase upstream/dev
# Format Go code
go fmt ./...
# Run tests
go test ./...
# Format frontend code
cd web && npm run lint -- --fix# Verify all issues are fixed
./scripts/pr-check.shgit push -f origin <your-pr-branch>- ✅ Syncs with latest
upstream/dev - ✅ Rebases your changes
- ✅ Formats Go code (
go fmt) - ✅ Runs Go linting (
go vet) - ✅ Runs tests
- ✅ Formats frontend code (if applicable)
- ✅ Pushes changes to your PR
If you prefer to do it manually:
# Add upstream if not already added
git remote add upstream https://github.com/NoFxAiOS/nofx.git
# Fetch latest changes
git fetch upstream
# Rebase your branch
git checkout <your-pr-branch>
git rebase upstream/dev# Format Go code
go fmt ./...
# Run linting
go vet ./...
# Run tests
go test ./...
# If you made changes, commit them
git add .
git commit -m "chore: format and fix backend issues"cd web
# Install dependencies
npm install
# Fix linting issues
npm run lint -- --fix
# Check types
npm run type-check
# Test build
npm run build
cd ..
# Commit any fixes
git add .
git commit -m "chore: fix frontend issues"Ensure your PR title follows Conventional Commits:
<type>(<scope>): <description>
Examples:
feat(exchange): add OKX integration
fix(trader): resolve position tracking bug
docs(readme): update installation guide
Types:
feat- New featurefix- Bug fixdocs- Documentationrefactor- Code refactoringperf- Performance improvementtest- Test updateschore- Build/config changessecurity- Security improvements
git push -f origin <your-pr-branch>After migrating, verify:
- PR is rebased on latest
dev - No merge conflicts
- Backend tests pass locally
- Frontend builds successfully
- PR title follows Conventional Commits format
- All commits are meaningful
- Changes pushed to GitHub
After you push your changes:
- Automated checks will run (they won't block merging, just provide feedback)
- You'll get a comment with check results and suggestions
- Maintainers will review your PR with the new context
- Faster review thanks to pre-checks
If you get conflicts during rebase:
# Fix conflicts in your editor
# Then:
git add <fixed-files>
git rebase --continue
# Or abort and ask for help:
git rebase --abortNeed help? Just comment on your PR and we'll assist!
If tests fail:
# Run tests to see the error
go test ./...
# Fix the issue
# Then commit and push
git add .
git commit -m "fix: resolve test failures"
git push -f origin <your-pr-branch>If the migration script doesn't work:
- Check you have Go and Node.js installed
- Try manual migration (steps above)
- Ask for help in your PR comments
Don't want to migrate?
- That's okay! Your PR will still be reviewed and merged
- Migration is optional but recommended
First time using Git rebase?
- Check our Git guide
- Ask questions in your PR - we're here to help!
Want to learn more?
Stuck on migration?
- Comment on your PR
- Ask in Telegram
- Open a Discussion
We're here to help you succeed! 🚀
Once migrated:
- ✅ Wait for automated checks to run
- ✅ Address any feedback in comments
- ✅ Wait for maintainer review
- ✅ Celebrate when merged! 🎉
Thank you for contributing to NOFX!