Using the Github UI to Make Pull Requests: Difference between revisions
From Joomla! Documentation
Update the whole article with new text and screenshots |
Marked for translation |
||
| Line 1: | Line 1: | ||
This article helps you understanding and creating Pull Requests on Github, so you can contribute to a project like Joomla!. | <noinclude><languages /></noinclude> | ||
{{Top portal heading|color=white-bkgd|icon=book|icon-color=#5091cd|size=3x|text-color=#333|title=<translate>Tutorial</translate>}} | |||
<translate>This article helps you understanding and creating Pull Requests on Github, so you can contribute to a project like Joomla!.</translate> | |||
<translate> | |||
== What is a Pull Request? == | == What is a Pull Request? == | ||
A Pull Request is a <b>request</b> to <b>pull</b> some code to a repository (project) on GitHub. | </translate> | ||
<translate>A Pull Request is a <b>request</b> to <b>pull</b> some code to a repository (project) on GitHub.</translate> | |||
In basic language your asking if some code changes/additions you made can be used in the project. This changes can be the solution for a bug or a new feature. | <translate>In basic language your asking if some code changes/additions you made can be used in the project. This changes can be the solution for a bug or a new feature.</translate> | ||
<translate>Github has a simple web interface that makes it very easy to propose a simple change to code. You don't need to install any software or do anything beside register for a git hub account.</translate> | |||
Github has a simple web interface that makes it very easy to propose a simple change to code. You don't need to install any software or do anything beside register for a git hub account. | |||
<translate> | |||
== Identify the change you like to made == | == Identify the change you like to made == | ||
First of all, map what changes you like to made. | </translate> | ||
<translate>First of all, map what changes you like to made.</translate> | |||
For example, we like to add an icon for at the article info block, before the authors name. On the moment of writing, this icon is not displayed yet. | <translate>For example, we like to add an icon for at the article info block, before the authors name. On the moment of writing, this icon is not displayed yet.</translate> | ||
[[File:Infoblock before.png|frame|none]] | [[File:Infoblock before.png|frame|none]] | ||
<translate> | |||
== Find the file you want to modify on Github== | == Find the file you want to modify on Github== | ||
If you don't have a GitHub account yet, sign up on [http://www.github.com GitHub]. It is free and very easy to do. After that, go to the [http://www.github.com/joomla/joomla-cms Joomla! CMS repository] and find the file you like to edit. You can navigate through by clicking on the folder and file name. | </translate> | ||
<translate>If you don't have a GitHub account yet, sign up on [http://www.github.com GitHub]. It is free and very easy to do. After that, go to the [http://www.github.com/joomla/joomla-cms Joomla! CMS repository] and find the file you like to edit. You can navigate through by clicking on the folder and file name.</translate> | |||
This can be a hard step sometimes, because Joomla! counts more than 6000 files. In our example we have to edit the following file: /layouts/joomla/content/info_block/author.php. | <translate>This can be a hard step sometimes, because Joomla! counts more than 6000 files. In our example we have to edit the following file: /layouts/joomla/content/info_block/author.php.</translate> | ||
[[File:Github joomlacms.png|thumbnail|none]] | [[File:Github joomlacms.png|thumbnail|none]] | ||
<translate> | |||
== Make your changes == | == Make your changes == | ||
Navigate to the file, and edit the file by clicking on the pencil icon on the right. | </translate> | ||
<translate>Navigate to the file, and edit the file by clicking on the pencil icon on the right.</translate> | |||
In our example, we add the following code to line 14 of the file: autor.php | <translate>In our example, we add the following code to line 14 of the file: <tt>autor.php</tt></translate> | ||
<source lang="xml"> | <source lang="xml"> | ||
<span class="icon-user"></span> | <span class="icon-user"></span> | ||
| Line 33: | Line 41: | ||
[[File:Github_filechange.png|thumbnail|none]] | [[File:Github_filechange.png|thumbnail|none]] | ||
Note: you may have noticed the blue message above the page. This message is telling you that GitHub made a copy of the project for you, where you can made changes. This copy is called a Fork. The changes you made in this copy can be used in the original project. If you like to read more about how GitHub works, [https://guides.github.com/introduction/flow/ you can read this article] for some background information. | <translate>Note: you may have noticed the blue message above the page. This message is telling you that GitHub made a copy of the project for you, where you can made changes. This copy is called a Fork. The changes you made in this copy can be used in the original project. If you like to read more about how GitHub works, [https://guides.github.com/introduction/flow/ you can read this article] for some background information.</translate> | ||
<translate> | |||
== Add a title and description == | == Add a title and description == | ||
Below the editor, we can specify our Pull Request by adding a title and a description. | </translate> | ||
<translate>Below the editor, we can specify our Pull Request by adding a title and a description.</translate> | |||
The title had to be sort, and must tell what this pull request does. The description contains more detailed information about the Pull request and some information how to test it. Make this information so complete and clear as possible. | <translate>The title had to be sort, and must tell what this pull request does. The description contains more detailed information about the Pull request and some information how to test it. Make this information so complete and clear as possible.</translate> | ||
[[File:Github description.png|thumbnail|none]] | [[File:Github description.png|thumbnail|none]] | ||
<translate> | |||
== Send the Pull Request == | == Send the Pull Request == | ||
Click on the button "Propose file changes" and you're Pull Request is made! | </translate> | ||
<translate>Click on the button "Propose file changes" and you're Pull Request is made!</translate> | |||
<translate> | |||
== And now? == | == And now? == | ||
The only thing you had to do now is waiting until someone see this PR and test it. When someone reacts, you will be notified via an email. It may happen someone requested addition information, so try to stay up-to-date with you Pull Request. | </translate> | ||
<translate>The only thing you had to do now is waiting until someone see this PR and test it. When someone reacts, you will be notified via an email. It may happen someone requested addition information, so try to stay up-to-date with you Pull Request.</translate> | |||
If a Pull Request is twitce successfully tested, someone with moderator right will add the label 'RTC' to it. RTC means: Ready To Commit'. In basic language it tells someone who has admin right: He, this Pull request is successfully tested, and can be add to Joomla!. The admin will add (Merge) the project to the Joomla! CMS github repository. You Pull Request is definitive now, and well be present in the next version of Joomla!. | <translate>If a Pull Request is twitce successfully tested, someone with moderator right will add the label 'RTC' to it. RTC means: Ready To Commit'. In basic language it tells someone who has admin right: He, this Pull request is successfully tested, and can be add to Joomla!. The admin will add (Merge) the project to the Joomla! CMS github repository. You Pull Request is definitive now, and well be present in the next version of Joomla!.</translate> | ||
<noinclude> | <noinclude> | ||
<translate> | |||
[[Category:Bug Squad]] | [[Category:Bug Squad]] | ||
[[Category:Development]] | [[Category:Development]] | ||
[[Category:GitHub]] | [[Category:GitHub]] | ||
[[Category:Tutorials]] | |||
</translate> | |||
</noinclude> | </noinclude> | ||
Revision as of 11:08, 29 August 2015
This article helps you understanding and creating Pull Requests on Github, so you can contribute to a project like Joomla!.
What is a Pull Request?
A Pull Request is a request to pull some code to a repository (project) on GitHub.
In basic language your asking if some code changes/additions you made can be used in the project. This changes can be the solution for a bug or a new feature. Github has a simple web interface that makes it very easy to propose a simple change to code. You don't need to install any software or do anything beside register for a git hub account.
Identify the change you like to made
First of all, map what changes you like to made.
For example, we like to add an icon for at the article info block, before the authors name. On the moment of writing, this icon is not displayed yet.

Find the file you want to modify on Github
If you don't have a GitHub account yet, sign up on GitHub. It is free and very easy to do. After that, go to the Joomla! CMS repository and find the file you like to edit. You can navigate through by clicking on the folder and file name.
This can be a hard step sometimes, because Joomla! counts more than 6000 files. In our example we have to edit the following file: /layouts/joomla/content/info_block/author.php.

Make your changes
Navigate to the file, and edit the file by clicking on the pencil icon on the right.
In our example, we add the following code to line 14 of the file: autor.php
<span class="icon-user"></span>

Note: you may have noticed the blue message above the page. This message is telling you that GitHub made a copy of the project for you, where you can made changes. This copy is called a Fork. The changes you made in this copy can be used in the original project. If you like to read more about how GitHub works, you can read this article for some background information.
Add a title and description
Below the editor, we can specify our Pull Request by adding a title and a description.
The title had to be sort, and must tell what this pull request does. The description contains more detailed information about the Pull request and some information how to test it. Make this information so complete and clear as possible.

Send the Pull Request
Click on the button "Propose file changes" and you're Pull Request is made!
And now?
The only thing you had to do now is waiting until someone see this PR and test it. When someone reacts, you will be notified via an email. It may happen someone requested addition information, so try to stay up-to-date with you Pull Request.
If a Pull Request is twitce successfully tested, someone with moderator right will add the label 'RTC' to it. RTC means: Ready To Commit'. In basic language it tells someone who has admin right: He, this Pull request is successfully tested, and can be add to Joomla!. The admin will add (Merge) the project to the Joomla! CMS github repository. You Pull Request is definitive now, and well be present in the next version of Joomla!.