-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Create a Good PR
- Table of contents
- Why It Matters
- Before You Open Your PR
- What Makes a PR “Great”
- Common Mistakes to Avoid
- Final Checklist Before You Request Review
- Reviewers Appreciate...
- Need Help?
This page is an introduction to creating a great Pull Request (PR). A great Pull Request (PR) is more than just code—it’s clean, clear, and easy for reviewers to understand. This guide shares best practices for writing high-quality PRs that are easy to review and quick to merge.
A good pull request isn’t just about working code—it’s about making collaboration easier. Clear, well-structured PRs save reviewers time, reduce confusion, and help maintain high code quality. In open source, thoughtful PRs build trust and keep the project maintainable for everyone.
For the essential checklist and best practices, be sure to follow Rules for making PRs—every good PR starts there.
Make sure you’ve:
- Created a branch off the latest
develop - Pulled the latest code:
git pull upstream develop - Tested your changes locally
- Passed all relevant tests
- Cleaned up your code (no stray debug logs or commented code)
- Written a fix plan (if required) and got it approved
Here’s what makes a PR stand out:
Use a descriptive PR title and mention the issue number.
Good:
Fix #4567: Align navbar correctly on small screens
Bad:
Update UI stuff
- Stick to one topic per PR
- Don’t sneak in unrelated changes
- Keep your PRs small when possible—smaller PRs are faster to review
Fill out the PR template completely:
- What did you change?
- Why was it needed?
- Any tricky parts?
- Screenshots for UI changes
- Questions you want feedback on
If your PR changes the UI, include before-and-after screenshots. This helps reviewers instantly understand the visual impact.
Before requesting review:
- All tests pass (unit, integration, lint)
- You've tested manually (especially for UI or logic changes)
- Edge cases are handled
| ❌ Don’t Do This | ✅ Do This Instead |
|---|---|
| "Fix some stuff" in title | "Fix #1234: Add padding to dashboard cards" |
| Combine unrelated fixes | Separate into focused PRs |
| Skip writing a description | Clearly explain what and why |
| Add unfinished code | Only push code that’s ready |
| Forget screenshots | Add visual proof for UI changes |
- My PR addresses one issue only
- I followed Oppia’s code style
- All tests pass
- I filled out the PR template
- I included screenshots (if needed)
- My commit message is clear and formatted
- I pushed the latest code
- I’m ready to respond to reviews promptly
- Clean, readable code
- Clear commit history
- Context provided in comments if something’s non-obvious
- Respect for their time
Don’t be afraid to ask! You can:
- Tag reviewers in comments
- Use GitHub Discussions
Thanks for taking the time to make your PR shine.
High-quality PRs make Oppia better for everyone!
Have an idea for how to improve the wiki? Please help make our documentation better by following our instructions for contributing to the wiki.
Core documentation
- Oppia's mission
- Code of Conduct
- Get involved!
- How to report a bug
- Google Summer of Code 2026
- Hacktoberfest 2025
Developing Oppia
- FAQs
- How to get help
- Getting started with the project
- How the codebase is organized
- Making your first PR
- Debugging
- Testing
- Codebase policies and processes
- Guidelines for launching new features
- Guidelines for making an urgent fix (hotfix)
- Testing jobs and other features on production
- Guidelines for Developers with Write Access to the Oppia Repository
- Release schedule and other information
- Revert and Regression Policy
- Privacy aware programming
- Code review:
- Project organization:
- QA Testing:
- Design docs:
- Team-Specific Guides
Developer Reference
- Oppiabot
- Git cheat sheet
- Frontend
- Backend
- Backend Type Annotations
- Writing state migrations
- Calculating statistics
- Storage models
- Coding for speed in GAE
- Adding a new page
- Adding static assets
- Wipeout Implementation
- Notes on NDB Datastore transactions
- How to handle merging of change lists for exploration properties
- Instructions for editing roles or actions
- Protocol buffers
- Webpack
- Third-party libraries
- Extension frameworks
- Oppia-ml Extension
- Mobile development
- Performance testing
- Build process
- Best practices for leading Oppia teams
- Past Events