How I landed my first Pull Request on Node.js

Disclaimer: The article is way less exiting than what the title suggests.

So a week or so ago I decided to try my hand at contributing to one of the biggest open source projects I work with right now: the Node.js project.

I learned about a site that is meant to help you with your first commit through the NodeUP podcast, so I decided to try my had at it.

Here is how it works:

#1 You Download the project

Obviously you first need the code to work on, so you’ll be instructed to fork, clone and compile the project on your local machine. This can be a daunting task if you’re just starting out, but fear not! The site has all the required info (or the links to said info) that you might need, all you have to do is make sure you read through the pages and follow the steps.

Note that compiling the project in this context actually means running the tests, since you’re not actually interested in using the downloaded version of Node, you just want to make changes and make sure you didn’t break anything :)

Also, note that doing the initial “make” can take quite a while, so make sure you’re not doing anything heavy with your computer while compiling, in fact, I would suggest leaving it alone for a while go get a cup of coffee or something.

#1.1 If you’re new to GIT, don’t worry

They also provide you with the step-by-step guide to configuring your GIT variables so you can properly identify in your commits. Here is a nice list of links in case you’ve never used GIT before.

#2 Contact the team

After you’ve forked, downloaded, compiled and configured everything you had to, you’ll have to send the last few lines of the test execution to the Node-Todo team requesting for your first issue to fix.

If you ask me, this is a great thing, because they don’t just give you a link, they’ll email you with the file you need to fix, the line you need to change, and they’ll even tell you what you need to do to change it. Yes, it’s a bit underwhelming if you think about it, but you’re just starting, so it feels right to be guided.

Doing the changes is easy, again, you’re sent a very easy and simple change, you’re not going to be working on a new feature or even adding more than 1 o 2 lines of code, but that make sense.

#2.1 Changing code is actually the easiest part

This is why it’s so great that you’re just working on a minimal issue, after you’re done, you need to start prepping the commit. And that is no trivial thing.

You’ll have to:

  1. Properly document the changes following a very specific format

  2. Create a Pull Request

  3. Comment your PR following a pre-defined template

  4. Wait for the PR to get commented back or merged

There is, ofcourse, a lot of information regarding these steps, both on the site and on Node’s Github page. You just need to read it and be patient. If you mess it up, you’ll get notified about it and allowed to fix it. This is normal and expected, you’re just starting and there are a lot of formalities to follow.

#3 Now wait… or not?

Once you’ve done with your changes and your PR is waiting to be approved and merge, you can either rejoice in the fact that you just made a contribution to a huge project, or you can go to the list of Issues and start browsing through them.

By now, you should’ve learned that some issues are tagged as “Help Wanted” , “Mentor Available” or even “Good first issue”. You can simply go and browse through those lists, reading the comments until you find one you want to work on and simply ask for it on the comments. Then the process starts all over again.

What are you waiting for? Go, find an issue and start helping, Node is a great project to start giving back and with sites like Node To-Do, you can work your way into bigger and better PRs :)

Oh, and my PR finally got approved and merged recently:


Recent Posts

See All