Submit high-quality pull requests that get merged quickly.
This guide walks you through the entire pull request process, from preparation to merge.
Before Creating a PR
1. Discuss Major Changes
For significant features or changes:
- Open an issue first - Describe what you want to build
- Get feedback - Ensure it aligns with project goals
- Wait for approval - Look for
design/approvedlabel - Then start coding - Build what was agreed upon
Why? Prevents wasted effort on changes that won’t be merged.
“Please do not raise a proposal after doing the work - this is counter to the spirit of the project.” - Akash Contributing Guidelines
2. Verify Your Changes
Run all checks locally:
# Go projectsmake testmake lintmake build
# JavaScript projectsnpm testnpm run lintnpm run buildEnsure:
- **All tests pass
- **No linter errors
- **Code builds successfully
- **No new warnings
3. Update Documentation
If your changes affect:
- User behavior - Update relevant docs
- API - Update API documentation
- Configuration - Update config docs
- CLI commands - Update CLI reference
Creating the Pull Request
Step 1: Prepare Your Branch
# Ensure you're on your feature branchgit checkout feature/your-feature
# Rebase on latest main (if needed)git fetch upstreamgit rebase upstream/main
# Push to your forkgit push origin feature/your-featureStep 2: Open the PR
- Go to GitHub - Navigate to your fork
- Click “Compare & pull request”
- Select base and compare branches:
- Base:
akash-network/repo→main - Compare:
your-fork/repo→feature/your-feature
- Base:
Step 3: Fill Out PR Template
Title
Use conventional commit format:
feat: add GPU model filtering to bidenginefix: resolve escrow balance calculation errordocs: update CLI installation guidechore: bump Go version to 1.25Description
Provide a clear, complete description:
## What
Brief summary of what this PR does.
## Why
Explain the problem this solves or feature this adds.
## Changes
- List specific changes made- Include technical details- Mention any breaking changes
## Testing
How did you test this?- [ ] Unit tests added- [ ] Integration tests passed- [ ] Manual testing performed
## Screenshots (if applicable)
Include before/after screenshots for UI changes.
## Related Issues
Fixes #123Relates to #456Example:
## What
Adds GPU model filtering to the bidengine, allowing providers to filterbids based on specific GPU models and memory requirements.
## Why
Providers were receiving bids for GPU models they don't have, causingbid failures and wasted resources. This change allows providers to onlybid on deployments they can actually fulfill.
## Changes
- Add `GPUFilter` struct to bidengine- Implement GPU model matching logic- Add configuration options for GPU filtering- Update provider config schema
## Testing
- [x] Unit tests added for GPU filtering logic- [x] Integration tests pass- [x] Manually tested with RTX 3090 and A100 GPUs
## Related Issues
Fixes #789Step 4: Link Issues
Use keywords to auto-close issues:
Fixes #123- Closes issue when PR mergesCloses #123- Same as FixesResolves #123- Same as FixesRelates to #123- References without closing
After Submitting
Automated Checks
Your PR will trigger:
Go Projects:
- **Tests (
make test) - **Linting (
make lint) - **Build verification
- **Coverage report
JavaScript Projects:
- **Tests (
npm test) - **Linting (
npm run lint) - **Type checking
- **Build verification
All checks must pass before merge.
Code Review Process
Timeline
- Initial review: 2-7 days typically
- Follow-up reviews: 1-3 days
- Merge: After all feedback addressed
Note: Reviews are done by volunteers. Be patient and follow up politely if needed.
Responding to Feedback
Good responses:
**"Great catch! Fixed in latest commit."**"I considered that approach but chose X because Y. Thoughts?"**"Good point. Changed to use interface instead."**"Can you clarify what you mean by...?"Avoid:
**"This is fine as-is."**No response (ignoring feedback)**"You're wrong."**Defensive or argumentative responsesMaking Changes
# Make requested changes# ... edit files ...
# Commit changes (signed-off)git add .git commit -s -m "fix: address review feedback"
# Push to update PRgit push origin feature/your-featureTips:
- Address all comments
- Mark conversations as resolved when fixed
- Ask for clarification if unclear
- Be open to suggestions
Common PR Issues
Issue: Tests Failing
Problem: CI tests fail
Solution:
# Run tests locallymake test # or npm test
# Fix failing tests# ... make changes ...
# Verify fixmake test
# Commit and pushgit commit -s -m "test: fix failing tests"git push origin feature/your-featureIssue: Merge Conflicts
Problem: Your branch conflicts with main
Solution:
# Fetch latest maingit fetch upstream
# Rebase on maingit rebase upstream/main
# Resolve conflicts# ... edit conflicting files ...
# Continue rebasegit add .git rebase --continue
# Force push (rebase rewrites history)git push --force-with-lease origin feature/your-featureIssue: Linter Errors
Problem: Linter finds issues
Solution:
# Run lintermake lint # or npm run lint
# Auto-fix what's possiblemake lint-fix # or npm run lint:fix
# Manually fix remaining issues# ... edit files ...
# Verifymake lint
# Commitgit commit -s -m "style: fix linter errors"git push origin feature/your-featureIssue: Missing Sign-off
Problem: Commits not signed-off
Solution:
# Sign off last commitgit commit --amend --signoff
# Sign off multiple commits (interactive rebase)git rebase -i HEAD~3 # for last 3 commits# In editor, change 'pick' to 'edit' for commits to sign# For each commit:git commit --amend --signoffgit rebase --continue
# Push (force required after rebase)git push --force-with-lease origin feature/your-featureIssue: Too Many Commits
Problem: PR has many small commits
Solution:
# Squash commitsgit rebase -i HEAD~5 # for last 5 commits
# In editor, keep first 'pick', change rest to 'squash'# Save and edit commit message
# Pushgit push --force-with-lease origin feature/your-featurePR Requirements Checklist
Before Requesting Review
- Tests pass - All automated tests green
- Linter passes - No linting errors
- Commits signed - All commits have sign-off
- Clear description - Explains what, why, and how
- Documentation updated - If applicable
- No merge conflicts - Rebased on latest main
- Reviewable size - Not too large (< 500 lines ideal)
During Review
- Respond to comments - Address all feedback
- Be professional - Stay respectful and collaborative
- Ask questions - If anything is unclear
- Update commits - Fix issues found in review
- Mark resolved - Mark conversations as resolved
Before Merge
- All checks pass - Green checkmarks on all CI
- Review approved - At least one approval
- Feedback addressed - All comments resolved
- Up to date - No conflicts with main
PR Size Guidelines
Ideal PR Size
- Small: < 200 lines changed
- Medium: 200-500 lines
- Large: 500+ lines (try to avoid)
Breaking Up Large Changes
# Instead of one large PR:feat: complete provider bidengine rewrite (2000 lines)
# Create multiple smaller PRs:1. refactor: extract bid validation to separate package2. feat: add GPU filtering to bid validation3. feat: implement new bid pricing algorithm4. feat: add bid priority system5. docs: update bidengine documentationBenefits:
- Easier to review
- Faster to merge
- Easier to revert if needed
- Better git history
PR Review Etiquette
As a PR Author
Do:
- **Be responsive to feedback
- **Accept constructive criticism
- **Learn from suggestions
- **Thank reviewers
- **Be patient
Don’t:
- **Take feedback personally
- **Argue with reviewers
- **Rush reviewers
- **Ignore comments
- **Get defensive
As a Reviewer
Do:
- **Be constructive and kind
- **Explain why changes are needed
- **Suggest alternatives
- **Praise good code
- **Be thorough but timely
Don’t:
- **Be condescending
- **Nitpick excessively
- **Request perfect code
- **Block without explanation
- **Ghost the author
After Merge
Celebrate!
Your contribution is now part of Akash Network!
Next Steps
-
Delete your branch:
Terminal window git branch -d feature/your-featuregit push origin --delete feature/your-feature -
Update your fork:
Terminal window git checkout maingit pull upstream maingit push origin main -
Find another issue:
- Browse open issues
- Look for
good first issuelabels - Help review others’ PRs
-
Share your contribution:
- Tweet about it
- Blog about your experience
- Help others contribute
Common Questions
”How long until my PR is reviewed?”
Answer: Typically 2-7 days for initial review. Maintainers are volunteers with varying availability.
What you can do:
- Ensure all CI checks pass
- Provide a clear description
- Join Discord and mention your PR (politely)
- Be patient
”Can I work on multiple PRs at once?”
Answer: Yes! Just keep them in separate branches:
git checkout -b feature/gpu-filtering# Work on GPU filtering PR
git checkout maingit checkout -b fix/escrow-bug# Work on escrow bug fix PR“My PR was closed without merging”
Possible reasons:
- Didn’t follow contributing guidelines
- Duplicate of another PR
- Doesn’t align with project goals
- No response to review feedback for 30+ days
What to do:
- Read the closing comment
- Address the concerns
- Reopen if appropriate
- Ask in Discord for guidance
”Do I need approval before starting?”
For small changes: No
- Bug fixes
- Documentation improvements
- Typo fixes
For large changes: Yes
- New features
- API changes
- Architecture changes
Open an issue first and wait for design/approved label.
Resources
- Code Conventions - Coding standards
- Getting Started - First contribution guide
- GitHub PR Documentation - GitHub’s official guide
Ready to submit? Make sure your PR follows this process and get ready to contribute!
Questions? Ask in Discord #developers!