Happy Hacktoberfest!

A great way to get involved in open source

Happy Hacktoberfest!
Photo from Hacktoberfest.

Fall is here, and so are all of its pumpkin spice-filled shenanigans. That also means that it is time for Hacktoberfest! You might ask, “What is that?” Hacktoberfest is a month-long event hosted by DigitalOcean, DEV, and Intel. It is a push to get new developers to contribute to open source projects.

Why participate? Well, the first 70,000 people to commit four pull requests this month (after registering at the Hacktoberfest website) will get a free T-shirt! They are really nice T-shirts and tend to come with cool stickers too.


Finding an Issue

Find an issue! Thankfully, the members of GitHub and the Hacktoberfest team have made this super simple. First, you will want to search for the Hacktoberfest tag in the search bar of GitHub and select all of GitHub. Next, you will want to filter this down to Issues and then Open issues. Sort by new and pick what language you want to contribute to from the left sidebar. Alternatively, you can use this link that has all the settings selected.

Below is an image of what my search looked like. If you are looking for a good issue for someone who is new, you can check out the ones that have the “beginner” or “good first issue” tag:

Hacktoberfest’s GitHub page.
Screenshot by the author.

Contributing: Forking the Repo

Once you have found a project you would like to work on, you should check to see if there is a Contributing.md file. These files will typically tell you about what conventions they use (e.g. testing, documentation, or code style standards).

After reading that over, you will need to create a fork of the repository. Creating a fork is as simple as going to the top right of the repo and selecting the fork button. Creating a fork means you are taking a copy of the repository to work on under your account.

An important thing to note is when you create a fork, you do not automatically get updates from the parent repository. Check out this guide to sync your repo with a parent.

The “About” section of a Readme.
Screenshot by the author.

Contributing: Making Changes

Next, you will want to clone the fork you created (it will show under your repository). Once you have done that, it works like any other Git repo you have worked with. If you are new to Git or GitHub, this guide will show the basics of working on your repository.

Code snippet.
Screenshot by the author.

Here is an example of what a good commit request will look like. I have implemented the change they asked for. I have a docstring to explain what the function does, typing (not necessary for most repos), and comments to describe what the code is doing:

Code snippet.
Screenshot by the author.

I have this committed and pushed up to my personal fork of the repo. Next, we will take a look at how to create a pull request.


Contributing: Making a Pull Request

OK, now that you have made your edits and pushed them to your fork, it’s time for the PR (pull request). Here on my copy of Hack-DSA, you can see the “Pull request” button in the bottom right. Go ahead and click that:

Creating a pull request.
Screenshot by the author.

Next, you will want to make sure the appropriate changes have made their way into the commit. Once you have checked that, select the green “Create pull request” button on the right.

Creating a pull request.
Screenshot by the author.

You will want to reference the issue number of the issue you are solving fully or in part. For our example, we will be partially solving issue #9.

Identifying which issue you are solving.
Screenshot by the author.

In our pull request, you will want to describe what you have changed and tag the issue number we mentioned in the previous step. Finally, select the “Create pull request” button at the bottom right!

Opening a pull request.
Screenshot by the author.

Congratulations! Just like that, you have submitted your first pull request and are well on your way to getting your swag! Make sure to pay attention to your pull request, though, as the project may come back and ask you to make changes to be in compliance with their standards.

Happy Hacktoberfest and have fun contributing!