Hacktoberfest 2019 – let’s contribute to open-source
Daniel Verner -
Hacktoberfest is an initiative organized by DigitalOcean and DEV.to, with the goal to involve more developers in the open-source development to improve and fix open-source projects.
we use a lot of open-source software in our daily work, developers’ lives would be much harder without open source
It is fun to contribute, and give back to the community
You can build your own reputation as a developer, and your company’s reputation as well
Last but not least, you can earn a Hacktoberfest T-shirt 🙂
Find a project
Every public repository on GitHub will do, but you can find some projects on the Hacktoberfest’s website here, and also you can search for issues on GitHub labeled with Hacktoberfest.
Fork the project
You shouldn’t clone the original repository, but create a fork from the project. It is easy to do on GitHub, just click on the Fork button after opening the repository:
When the fork has been created, you can clone your own fork:
Depending on the project you might need to do some setup and initialization, for example:
npm run dev
Usually, the open-source project already has a test framework installed, and already has tests. Depending on the project it might be PHPUnit, codecept, jasmine, jest, JUnit, or any other. As a first step create a failing test, which reproduces the issue you want to fix. It is an important step, so the maintainer of the project can reproduce the issue, and see if your fix is appropriate and last but not least the test ensures that the changes made later would not break your fix.
Fix the issue, make your test pass, but run all the tests before creating the pull request and make sure they all pass.
Create a pull request
When the changes are done, the tests pass, commit, and push your changes to your fork. Create a pull request to the original repository, to let the maintainer know, you fixed the issue and want to contribute.
If everything went well and your changes can be merged to the original repository without any conflicts, you can create the pull request:
Reference the issue
On GitHub you can reference the issue by using the following keywords in your commit or pull request messages:
Using one of these keywords the issue will be closed automatically when the pull request is approved.
For example, This PR fixes #12.
You can find more info on this topic on GitHub’s help page here.
When should we do it? The general answer is always :-), but especially NOW, the Hacktoberfest is already started and it lasts in the whole of October. You need to create 4 pull requests to open source repositories and if the maintainer doesn’t mark it as spam, you will be eligible to participate. The first 50.000 participants will earn a T-shirt.
Let’s go hacking!
Tags: development · howto · Hacktoberfest · open-source