Every Developer Should Be Able to Do Some PR

Don't worry, we're not going to talk about public relations, the PR in the title stands for the “pull request”, the base unit of contribution in today's open-source world. The intention of this article is to shed some light on how to start contributing in an open-source project.

As you may know, Kentico's open-source projects are hosted on GitHub, which is an online code repository system based on Git. Git is probably the most powerful version control system that is out there today, but its complexity comes hand in hand with a steep learning curve. Though GitHub tries hard to compensate for this steepness by wrapping Git in a fancy UI and making the development process straightforward, it's still not always completely clear what's going on behind the scenes. This is something that often discourages newcomers from contributing to open-source projects.

When it comes to contributions, you'll often hear people talking about "PR" or "pull requests". PR is a way of submitting your changes to an open-source project. Basically, it is a request for the maintainer of the project to pull your changes and merge them into the main codebase. When you are able to submit a pull request, you are ready to contribute. Creating a pull request has some rules and requires a certain level of knowledge. To make it easier for beginners, we put some effort into making our repositories more friendly () and became part of Up for Grabs and First Timers Only initiatives.

So let me take you through the process of creating your first PR.

Boost your confidence

Git is hard, GitHub is hard. So we'll need some encouragement to make the first step.

Find a simple issue to start with

Many repositories contain issues marked with first-timers-only and up-for-grabs labels. KInspector and AD Import Service are no exceptions. These labels are to distinguish issues that should be easy to implement and contain a detailed walk-through of the whole contribution process.

You can also browse the up-for-grabs.net site, which gathers and categorizes such issues and makes them easy to find.

Submit your first PR

Assuming you already have an account on GitHub and you've chosen an issue and assigned it to yourself. (The following steps and graphics demonstrate the process on the Kentico/KInspector repository.)

Go to the "Team Explorer -> Changes" and provide a meaningful message followed by an issue identifier (e.g., "Added username validation - Fixes #10") and click the commit button. This will commit the changes to your local repository.

Provide a meaningful description of your changes and submit a pull request.

Wait until we review the code (we may merge it directly or suggest some additional changes).

The whole flow looks like this:

Discuss

You can always reach out to us via Gitter. Both our projects have their Gitter rooms, so just go to the repository and click the button. You can also leave your comments in issues.

Summing up

Contributing to an open-source project can be really rewarding. It's not about doing someone else's job, it's about broadening horizons, diving deep into technology you're interested in. It's a great opportunity to find out more about how things work under the hood instead of just using them blindly.

Let your first pull request be for a Kentico repository. We are ready to help you!