Posted on

Contributing to Boxes

I have to admit that Boxes is a bit late for the Flatpak party, but that’s not a problem. The technical difficulties of getting a virtualization hypervisor to run inside the flatpak sandbox are mostly overcomed. This way, contributing to Boxes has never been easier.

In the following sections I will describe the step-by-step process of making your first code contribution to GNOME Boxes.

Get GNOME Builder

Builder makes it very easy to download and build GNOME applications with just a couple of clicks. It will also make your life easier while writing the code.

Download Builder

Download and build Boxes

GNOME Builder: cloning a project and building it

That’s it! Now that you have the project built and can run it, we can start looking into fixing bugs.

Finding an issue to hack

You can have an overview of the ongoing work in the project by browsing our kanban board. We also have issues tagged as Newcomers if you are making your first contribution and want to start hacking on something easy.

Create a GitLab account and fork the project

Visit gitlab.gnome.org and create an account. GitLab will pop up a banner asking you to add your SSH keys to your profile, or you can go directly to edit your profile.

After your profile has been properly setup, it is time to fork the project!

Go to the Boxes project page and click the Fork button. This will create your own copy of the git repository under your personal namespace in GitLab.

Finally, get your fork URL and add to your local git repository as a remote:

git remote add fork $project_url

Making changes and submitting your code

After building Boxes and finding an issue to work, it is time to dive into the codebase. Edit the files and press the GNOME Builder “play” button to see your changes take effect.

Since the migration to GitLab, we have adopted the merge request workflow.

You need to:

1. Create a git branch and commit your changes

git checkout -b $descriptive-branch-name

Do your work, and commit your changes. Take a look at our commit message guidelines.

2. Push your changes for the world to see!

git push fork

A message with a link to create a merge request will be printed in your terminal. Click it, describe your changes, and Submit!

3. Follow up on the feedback

Me and other developers will review your work and recommend changes if necessary. We will iterate over and over until your contributions are ready to be merged.

4. Celebrate your first contribution!

Further reading

The steps described above are based on the GNOME Newcomers initiative. We have a detailed step-by-step process of making contributions and you should definitely check it out. It has pointers about documentation, tips about finding the right approach to dive into the code base, and examples.

Let’s do it!