Make your first pull request to an open-source project ๐ช
Sรฉgolรจne Alquier
Posted on October 16, 2020
Does the world of open-source sound both mysterious and appealing to you? You're not alone!
The best way to demystify it is to dare making your first pull request on a project!
You don't know where to start? No worries, this article should help you do so ๐.
Find a project you want to contribute to ๐ฏ
Think about the tools that you enjoy using: whether it's a CSS or JavaScript library, a VSCode extension, a gem...
Some of them could be open-source (it's the case for dev.to with forem โจ)
If you run out of ideas, you can get fresh ones by filtering by programming language for instance:
Find an issue you want to solve ๐ฎ
Ok now let's say you identified the project you want to work on! Where do you start, right?
1 - ๐ Find a good first issue
Filter issues
You can filter the issues by topic or level of difficulty. For a first PR, you can for instance look for the labels easy
or first issue
.
Make sure no one is working on it
Click on the issue and go through the comments to make sure no one is working on it. If the last comment dates back from a few weeks, you can probably comment and ask to do it!
2 - ๐ Identify yourself
Leave a comment to ask if you can work on the issue. It's best if you wait for an approval before starting, as it can be frustrating to spend time working on something for nothing!
This way you'll also notify others that you are working on this issue.
3 - โ Make sure you understand what's expected
Don't hesitate to ask questions in the comments to make sure you are crystal clear on the following before starting:
- what's the expected result
- how you can test it
- ...
Start coding! ๐ฅ
1 - ๐ฅ Fork the repo
This will create a copy of the repository on your GitHub account.
You can then clone the forked repository on your machine and let the fun begin! โจ
2 - ๐ Take a look at the doc
Take a look at the README.md and the CONTRIBUTING.md if there is one.
They should help you getting started and explain how to:
- create and name your branch: each project has its own conventions
- start the server and set-up the dev environment
3 - ๐ป Code the feature, fix the issue,...
Now that you got your server running, your environment setup, and your branch created... you can start coding! ๐ฅ
4 - โ Don't forget the tests!
Make sure you don't forget to test your feature or bugfix!
Once again, take a look at the doc, it should explain how to add tests to the project.
Make your pull request ๐
Once you're satisfied with your work, git push what you've done on the remote repository.
If you then go to the GitHub repo, it should now offer you to create a pull request!
Don't hesitate to provide details on what you've done, how you proceeded or why you chose this technical solution rather than another, in order to help the people who will review it and make sure your PR gets merged!
I hope you enjoyed this article and if it helps you take the plunge... I couldn't be happier! ๐ฅณ
If there are still bits that are not clear or you want to add anything, please don't hesitate to comment!
Posted on October 16, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
October 3, 2024
April 30, 2024