Here are some best practices that you want to keep in mind in your early days of contributing to open source projects.
Follow the Contributing Guidelines
Open source projects generally guide you on what they're looking for in terms of how to contribute. These are typically outlined in a top-level file named
A contributing guide may include code conventions, expectations around testing your changes, and how to document your changes.
Check out the Create React App example.
Create a Good Pull Request
What does a good pull request look like? Well, if a project has a contributing guide, this is where you should first look for any hints around what they're expecting.
In fact, if a document named
CONTRIBUTING exists then you'll see it linked when you click on the button to create a pull request the very first time:
When you write up your PR, you should provide enough detail to help reviewer. You'll want to explain:
- Why you made your changes? Basically, what was the motiviation behind your work?
- How did you test your changes? A test plan is highly appreciated if code changed. Mention the exact steps you took to test your changes. Screenshots and videos are also welcome where it makes sense.
Project maintainers can set up a special file to prompt you for the information they're looking for when you create a PR. Be sure to fill out all the requested details.
Staying Up to Date
Check your PR often to see if there is pending feedback you need to act on.
If you get busy, be open and let the reviewers know so they can plan accordingly. If for any reason you can't continue working on the PR, let the project maintainer know so they can reassign it as necessary.