Happy Hacktoween 🎃: My First Pull Request
Tags: hacktoberfest, hacktoberfest23, opensource, webdev
Published: 2023-10-06 05:23:56

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 🫴🏾**

{% embed https://www.youtube.com/embed/iX-22GqLZtg?si=gX6BFFm9lwX4kh5I %}

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

## Table of Contents
&nbsp;1. [Looking for issues 🔍](#looking-for-issues)
&nbsp;2. [The issue ⁉️](#the-issue)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.1. [Hacking Away 👻](#hacking-away)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.2. [The follow up 💬](#the-follow-up)
&nbsp;3. [The Twist 🪢](#the-twist)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.3. [The Rebirth 🪦🧟](#the-rebirth)
&nbsp;4. [Conclusion 🎇](#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
```
to
```
label:hacktoberfest language:python
```
to
```
label:hacktoberfest language:javascript
```
to
```
label:hacktoberfest language:javascript language:typescript
```
to
```
label:hacktoberfest language:javascript language:typescript
```
to
```
label:hacktoberfest comments:<4 language:typescript
```
and the saga continued...
until I found an issue on this [project](https://github.com/mcruzdev/platformoon-web).

**Note:** Follow this [link](https://github.com/search?q=label%3Ahacktoberfest+language%3Atypescript+comments%3A%3C4&type=issues) 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](https://github.com/mcruzdev/platformoon-web) 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](https://github.com/mcruzdev/platformoon-web/pull/5).

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bmlmdv6t8k8wy44rb0rw.png)

I quickly removed the comments as requested with another [commit](https://github.com/mcruzdev/platformoon-web/pull/5/commits/2bb338b7fb0fee67e9c276f97f312bc2b99143ee).

![Remove testing commit](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xhdqskzw1pmy9tli4254.png)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qsxky0weanuudqt2o388.png)

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.