25 March 2016

How to Contribute to Joomla through Github

Written by Valentín García, Posted in How-to's,

How to Contribute to Joomla through Github

Github is the online service where the Joomla code is hosted and maintained. Here is the place where the updates are born, reviewed and tested, time before they are released.

Did you find a bug in Joomla that you want to fix?

In this post, I'll share a basic guide to help you submit your code to the Joomla CMS Project by using Github. Let's start!

It is important to be familiar with Github; you don't need to be an expert, though.

 

Step #1. Get your own copy of Joomla

It is necessary to create a copy of the Joomla CMS repository first.

joomla github

  • Click Fork button, and wait until the process finish.

joomla github

A copy of the Joomla core will be available as a new repository through your own Github account.

My username is htmgarcia, so my repository is available at github.com/htmgarcia/joomla-cms.

 

Step #2. Access your own Joomla repository

  • Go to github.com/your-github-username.
  • Click Repositories tab.
  • Find “joomla-cms” - This is your copy of Joomla's code.

joomla github

To confirm you’re indeed inside your copy of Joomla’s code (and not in the original), look for the details on top where it mention: your-github-username/joomla-cms, and below shows the original repository location.

joomla github

 

Step #4. Edit the files and commit changes within your repository

Here you have access to all the files from the Joomla core:

joomla github

Feel free to edit them based on the contribution you want to make, such as improvements, bug fixes, design suggestions, etc.

My example will be dummy; the purpose of this "improvement" is to illustrate the next steps.

  • I navigate through templates / protostar / css /  because I want to edit template.css.

joomla github

  • Click Edit - the pencil icon.

joomla github

Do the code changes you think will improve the CMS. In this case I’m adding a cute comment to the template’s CSS file. I strongly suggest you to do something more useful than that :D

joomla github

Once you finish, scroll down and click Commit changes button.

joomla github

An update message will confirm the file has been updated.

joomla github

 

Step #5. Send a Pull Request to the original Joomla repository

At this point, you modified the code in your own copy of Joomla.

The next step is to do a pull request, which means submit your changes from your copy of Joomla to the original repository.

  • Go back to your Joomla's repository - github.com/your-github-username/joomla-cms
  • Click New pull request.

joomla github

The next screen will display important information to check:

  • The base fork should be joomla/joomla-cms with “staging” as base.
  • Head fork should be your-github-username/joomla-cms with “staging” selected in compare box.
  • If everything is correct you can click Create pull request.

joomla github

A last confirmation step will ask you for details such as:

  • Pull request for issue - If your changes are intended to solve an existing issue from this list, type the number here.
  • Write a brief summary of your changes.
  • Provide detailed instructions to test your improvements.
  • Click Create pull request button when you’re done.

joomla github

 

Step #6. Wait until your contributions are reviewed

Joomla volunteers from the community will check your code, test and based on the results they will decide if worth to merge your improvements into the master branch.

Your pull request from previous step will be publicly available from here.

Pay attention during the next hours and/or days to the discussion that your pull request will generate. It is important to be part of the conversation until your contribution is accepted or not as part of the Joomla core.

******

If you want to know more about contributing to Joomla, read Filing bugs and issues document.

 

About the Author

Valentín García

Valentín García

Web developer and designer that love building sites with Joomla. Currently working at OSTraining as Director of Design.