Pull Request Process
This guide covers how to submit pull requests to Nexgent.
Before You Start
Checklist
- Issue exists for the change (create one if needed)
- You've read the Code Style Guide
- Tests pass locally
- You've tested your changes manually
Creating a Pull Request
1. Sync Your Fork
git fetch upstream
git checkout main
git merge upstream/main2. Create a Branch
git checkout -b type/description
# Examples
git checkout -b feat/webhook-signature-verification
git checkout -b fix/stop-loss-calculation
git checkout -b docs/api-rate-limiting3. Make Your Changes
- Follow the Code Style Guide
- Write tests for new functionality
- Update documentation if needed
4. Commit Your Changes
Use conventional commit format:
git add .
git commit -m "feat(signals): add webhook signature verification
- Add HMAC-SHA256 signature validation
- Add X-Signature header parsing
- Add tests for signature verification
Closes #123"5. Push to Your Fork
git push origin feat/webhook-signature-verification6. Open Pull Request
Go to GitHub and click "Compare & pull request".
PR Template
Use this template for your PR description:
## Summary
Brief description of what this PR does.
## Changes
- Change 1
- Change 2
- Change 3
## Testing
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
## Screenshots (if applicable)
[Add screenshots for UI changes]
## Related Issues
Closes #123PR Requirements
Code Quality
| Requirement | Check |
|---|---|
| TypeScript compiles | pnpm type-check |
| Linting passes | pnpm lint |
| Tests pass | pnpm test |
| No console.log | Remove debug logs |
Tests
- New features require tests
- Bug fixes should include regression tests
- Maintain or improve coverage
Documentation
- Update docs for new features
- Update JSDoc for public APIs
- Update README if needed
Review Process
What Reviewers Look For
- Correctness - Does it solve the problem?
- Tests - Are changes tested?
- Style - Does it follow conventions?
- Performance - Any performance concerns?
- Security - Any security implications?
Responding to Feedback
# Make requested changes
git add .
git commit -m "address review feedback"
git pushOr amend if small changes:
git add .
git commit --amend --no-edit
git push --force-with-leaseRequest Re-Review
After addressing feedback, request re-review by commenting:
@reviewer Ready for another look!CI Checks
PRs must pass all CI checks:
| Check | Description |
|---|---|
| Build | TypeScript compiles |
| Lint | ESLint passes |
| Unit Tests | All unit tests pass |
| Integration Tests | All integration tests pass |
| Type Check | No TypeScript errors |
Fixing CI Failures
# Check what's failing locally
pnpm type-check
pnpm lint
pnpm testCommon Issues
Merge Conflicts
# Update your branch with main
git fetch upstream
git checkout your-branch
git merge upstream/main
# Resolve conflicts, then
git add .
git commit -m "resolve merge conflicts"
git pushTests Failing in CI
- Ensure you ran tests locally:
pnpm test - Check for environment-specific issues
- Review CI logs for specific failures
PR Too Large
Break large PRs into smaller ones:
- Refactoring first - Separate PR for code restructuring
- Feature by feature - One PR per feature
- Tests separate - Add tests in separate PR if needed
After Merge
Delete Your Branch
git checkout main
git pull upstream main
git branch -d feat/your-featureCelebrate! 🎉
Thank you for contributing!
Quick Reference
Commit Types
| Type | Description |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Documentation |
style | Formatting |
refactor | Code restructuring |
test | Adding tests |
chore | Maintenance |
Branch Naming
feat/description # New feature
fix/description # Bug fix
docs/description # Documentation
refactor/description # Refactoring
test/description # TestsPR Checklist
- [ ] Code follows style guide
- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] CI checks pass
- [ ] PR description complete