docs/community/HOW_TO_MIGRATE_YOUR_PR.md
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.sh
This will analyze your PR and tell you:
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.sh
git push -f origin <your-pr-branch>
upstream/devgo fmt)go vet)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 improvementsgit push -f origin <your-pr-branch>
After migrating, verify:
devAfter you push your changes:
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 --abort
Need 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:
Don't want to migrate?
First time using Git rebase?
Want to learn more?
Stuck on migration?
We're here to help you succeed! π
Once migrated:
Thank you for contributing to NOFX!