loading...

Hacktoberfest 2019 – let’s contribute to open-source

daniel_werner profile image Daniel Werner Originally published at 42coders.com on ・3 min read

Introduction

Hacktoberfest is an initiative organized by DigitalOcean and DEV.to, with the goal to involve more developers into the open-source development to improve and fix open-source projects.

Why?

Because:

  • 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 🙂

How?

Find a project

Every public repository on GitHub will do, but you can find some projects on the Hacktoberfest’s webstite 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 set up and initialization, for example:

  • composer install
  • npm install
  • npm run dev
  • etc

Write tests

Usually open-source project already have test framework installed, and already have 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 a 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:

  • close
  • closes
  • closed
  • fix
  • fixes
  • fixed
  • resolve
  • resolves
  • resolved

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? NOW!

When should we do it? The general answer is always :-), but especially NOW, the Hacktoberfest is already started and it lasts in whole 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!

The post Hacktoberfest 2019 – let’s contribute to open-source appeared first on 42 Coders.

Posted on by:

daniel_werner profile

Daniel Werner

@daniel_werner

Senior Software Developer. Clean Code and TDD enthusiast. Team lead and mentor.

Discussion

markdown guide