DEV Community

Cover image for Happy Hacktoween πŸŽƒ: My First Pull Request
Amnish Singh Arora
Amnish Singh Arora

Posted on • Edited on

Happy Hacktoween πŸŽƒ: My First Pull Request

Today, I got my first hacktoberfest-accepted pull request merged and this blog will talk about the entire process from start to finish.
Before we get into it, let's take a moment to cherish the festive vibe of the month of October as we, as developers, get to experience the thrill of both halloween and hacktoberfest at the same time.

Catch the vibe 🫴🏾

Alright, so now that we got the vibes, its time to talk about the process we're all here for.

Table of Contents

Β 1. Looking for issues πŸ”
Β 2. The issue ⁉️
Β Β Β Β Β Β  2.1. Hacking Away πŸ‘»
Β Β Β Β Β Β  2.2. The follow up πŸ’¬
Β 3. The Twist πŸͺ’
Β Β Β Β Β Β  3.3. The Rebirth πŸͺ¦πŸ§Ÿ
Β 4. Conclusion πŸŽ‡

Looking for issues πŸ”

The very first step to fixing an issue is to find one. If you are worried there are not enough issues for you to fix out there, you shouldn't be.
There are thousands and thousands of issues with the label of hacktoberfest open on loads of open source projects, and I'll prove it with my experience.
When I started looking for issues, I tried various combinations of filters to help me trim down the results to the kinds I was actually looking for. I tried filtering by programming languages, using keywords to only get certain frameworks, limiting the issues by number of comments and what not.
Here's how I improved my search progressively:

label:hacktoberfest
Enter fullscreen mode Exit fullscreen mode

to

label:hacktoberfest language:python
Enter fullscreen mode Exit fullscreen mode

to

label:hacktoberfest language:javascript
Enter fullscreen mode Exit fullscreen mode

to

label:hacktoberfest language:javascript language:typescript
Enter fullscreen mode Exit fullscreen mode

to

label:hacktoberfest language:javascript language:typescript
Enter fullscreen mode Exit fullscreen mode

to

label:hacktoberfest comments:<4 language:typescript
Enter fullscreen mode Exit fullscreen mode

and the saga continued...
until I found an issue on this project.

Note: Follow this link for the final filter.

The issue ⁉️

The project I worked on was fairly new, and looked like a CRUD application from whatever was there in the repo so far. Since the project was new, the maintainer was looking for someone to add a CI pipeline using GitHub Actions.
This wasn't really too complicated and the fact that I had recently learnt to write CI pipelines using YAML in my cloud course further motivated me to go for this issue and kill 2 birds with one stone (practice YAML and good first issue).

Hacking Away πŸ‘»

As I mentioned, the issue wasn't particularly complicated, so wasn't the fix. All I had to do was add a Continuous Integration workflow that would perform 2 jobs on trigger:

  1. Check the code for linting errors
  2. Check if the code builds successfully

The workflow was supposed to be triggered whenever a new commit was pushed to the main branch, or a pull request was made to main.

Since I could reuse most of the part from the fragments microservice (private repo) I am working on for my cloud course as boilerplate, I quickly finished coding and opened a Pull Request.

I know I should have used npm ci in the build job as well, but lets stay quiet for now 🀫 (I forgot).

The follow up πŸ’¬

Since the changes were pretty small, there wasn't much to review and ask for changes. The maintainer thought my changes were good, and only wanted me to remove the commented out step I had added for running the test script.

PR convseration

I quickly removed the comments as requested with another commit.

Remove testing commit

And with that, I was almost done with my part of the process. Now all I had to do was wait for the maintainer to merge the PR.

The Twist πŸͺ’

Did you think the story ended there?

WRONG, again!

Remember, when I am reciting a story, there has to be a twist even if I have to make it up (just kidding).

Right when I thought I was done with my first official hacktoberfest PR, I was struck with worry and stress the very next day as I waited and waited for hours to get the confirmation email saying:

"Your Pull Request has been successfully merged"

I spent my breakfast time staring at my phone's screen restlessly waiting for that email (a mix of stress and excitement), afternoon passed, and so did the evening, but the email never came. I was dejected and had started planning to work on some other issue as well in case this one didn't work out.

The Rebirth πŸͺ¦πŸ§Ÿ

Even though I had started looking for other projects for contribution, I still wanted to try out my luck for one last time. I had this thought at the back of the head that what if the maintainer just got busy and never checked if I had pushed more commits.
So I quickly followed the link to his twitter account posted on his Github ID. Now I couldn't DM him on twitter as you have to be followed by the person to do that. However, I got his real name from his Twitter account, which I used to search for him on LinkedIn. Fortunately, I was able to locate his profile there.
I quickly sent him a connection request and shot a direct message asking if he could check my PR as I had pushed the changes as he requested.
I was really surprised on how polite the community is. He replied almost instantly, and within a few minutes of healthy conversation, I got my PR finally merged!!!

Conclusion πŸŽ‡

And that is how I was able to make my first open source contribution to count towards the hacktoberfest event.

Hacktoberfest 1st PR

which is under review period for now.

Not only I was able to get valuable experience of contributions work in real world, I was also able to add a new connection to my network.

My lesson:

Always avoid single points of failures, lest you're bound to crash someday.

Top comments (0)