Contributing to an Open Source Project on GitHub
Contributing to an open source project is a great way to become a better developer, improve your communication skills, and bolster your resume. However, it isn’t always obvious how to contribute to open source. Luckily, there are many ways to get started! From bug reports, to documentation fixes, to code patches, it takes many different types of contributions to keep an open source project up and running.
Do I need to write code to contribute to open source?
Many people assume that they must write code to contribute to an open source software project. However, this couldn’t be farther from the truth! While code is important, there are many valuable ways to contribute to open source that require little or no coding ability.
Creating issues is one way to contribute to open source without having to write any code. An issue is a written description of something that could be improved about a project, such as a bug report or a feature request. Most open source repositories have an issue tracker, which is a site where people submit issues for that project. The project maintainers then use the issue tracker to keep track of which issues are being worked on and by whom.
There are a few common types of issues:
- Bug reports let the maintainers know about a bug or error in their project.
- Feature requests suggest an entirely new feature or behavior for the project.
- Clarifying questions ask a question about the project that isn’t already answered by the project’s documentation.
As an example, let’s say you wanted to contribute to Pizza Please, an open source website that helps you find the best pizza near you. When you use the website, you see that one of the links in the dropdown menu is broken. To report this to the Pizza Please maintainers, you could open the following issue:
I expected clicking the “User Profile” link in the dropdown menu to bring me to my profile page.
Clicking the “User Profile” link did nothing.
GitHub has an issue tracker built into every project, but some maintainers may choose to use different software such as Jira or Trello. Before submitting an issue to an open source project, be sure to check out the project’s README for any specific instructions.
Another code-free way to contribute to open source is to write documentation.
The quality of a project’s documentation can have a huge impact on its success. Clear, detailed, and up-to-date documentation can make it easy for people to use and contribute to an open source project. On the other hand, confusing, out-of-date, or incomplete documentation might cause people to abandon an otherwise awesome project.
There are different types of documentation, all of which can be important to a project’s success:
- README: introduces people to the project and often contains links to the rest of the project’s documentation.
- Getting started guide: a short demonstration of how to use the project for the most simple use cases.
- Usage guide: a more detailed explanation of how to use all of the project’s features.
- Contribution guide: an explanation of how to set up the project on a local machine for the purpose of contributing code.
When contributing to a new open source project, it is often helpful to start by writing issues and documentation, and then move onto writing code once you’re more familiar with the project. This will give you a strong understanding of how the project is supposed to work, which is a great foundation for building your technical knowledge.
That being said, many people contribute regularly to open source without writing a single line of code, preferring instead to focus on writing issues or documentation. Their work makes it easier for new users and contributors to join the project and ensures the project’s longevity.
While writing code is the most common way that people think to contribute to open source, it can also be the most daunting.
If you’re writing your first code contribution to a project, it’s a good idea to first read through the issues in the issue tracker. Many project maintainers will put the “good first issue” label on issues that they think are best suited for beginners.
The issue tracker will also show you which issues are assigned – meaning they have someone actively working on them. Checking whether an issue is assigned will prevent you from working on the same issue as somebody else. If you want to work on an issue, make sure to leave a comment saying you’re working on it so the maintainers can assign it to you and save others the same trouble.
If you’ve found an issue you want to work on but don’t know where to start, it’s okay to ask for help! Many project maintainers and experienced contributors are willing to pair program with newcomers. Leave a comment on the issue asking if anybody would be willing to pair, and don’t get discouraged if you don’t hear back immediately. Open source maintainers are often busy, and it may take them some time to reply.
Other Ways to Contribute
While writing issues, documentation, and code are the most common ways to contribute to open source, they are definitely not the only ways. Here are some other ways you could contribute to an open source project:
- Review contributions
- Triage issues (e.g. by adding labels or identifying and deleting duplicates)
- Respond to questions relating to the project on StackOverflow or Reddit
- Make video tutorials or host workshops for the project
For example, there are almost 400,000 questions tagged “reactjs” on StackOverflow, many with thousands of upvotes. It wouldn’t be sustainable for the maintainers of React to answer every one of those questions, but with the help of the React community on StackOverflow, hundreds of thousands of people have had their questions answered. While the people who answer questions on StackOverflow aren’t adding code to project, they provide a valuable service to the community and should be seen as contributors in their own right.
One of the most upvoted React questions on StackOverflow
Crafting Strong Contributions
Want to create the strongest possible contribution? Here are some tips:
- Carefully read any available guidelines. If a project has contribution guidelines, be sure to read them over and follow any instructions provided. This will help you avoid any common pitfalls that might cause your contribution to be rejected.
- Ask for feedback. Before you invest a lot of time in a contribution, talk to the maintainers about what you have in mind. They may give you some helpful guidance.
- Look at other contributions. Read through other issues or pull requests, especially the ones that have already been accepted, and use them as guidance while crafting your own contributions.
When Your Contribution is Rejected
Rejection is a natural part of the open source experience. No matter how hard we work on a contribution, the maintainers of the project may still reject it. If this happens to you, remember that it isn’t personal. It’s the maintainer’s job to do what they think is best for the project. You can use their feedback to create a stronger contribution in the future, or try working on a different project. There are many open source projects out there waiting for your help.
The prospect of contributing to an open source project can be daunting, and it isn’t always obvious where to start. Remember that not all contributions involve writing code, and that creating issues, writing documentation, and answering questions for the community can add immense value to a project. If you face rejection, don’t give up! Rejection is a natural and important part of working on open source. Lastly, once you get started, remember to keep going! If you make multiple contributions to the same project, each one will be easier than the last.