9 048 Tutorial on making a pull request at Joomla Component Builder Snippets
Amigo edited this page 2019-08-30 11:13:03 +02:00

MAKING A PULL REQUEST AT JOOMLA COMPONENT BUILDER SNIPPETS

Process of taking Committed Changes to the Forked Version

00:00:00 (Click on these time links to see Youtube video)

This is a demonstration of the process of taking your committed changes to the forked version. The 'vdm-io/Joomla-Component-Builder-Snippets' is used and not the master branch. If this is a little different for you, I (as the administrator of the master branch) would like to assist you if there is really a holdup. 00:00:41 For the most part it will not be only me that will respond to issues but also other people out there involved in managing these Snippets.

00:01:05 NB. You should be able to after having done what has been explained in the previous tutorial too, update the snippets, get out a forked version of the repository, clone it down offline, and to unzip the package into that repository, update those files and commit those changes with messages. Then to push it up here after you have ensured that your branch is in sync with the upstream branch. If you do not understand, please go back, watch that tutorial, it is the previous one in the playlist on YouTube.00:01:40

Your Messages Was Committed

00:01:43

Once you are in your repository on GitHub and have to push your changes up here, there will be this message 'This branch is 4 commits ahead of vdm-io:master.', then you will be able to click on 'Pull request'.

Identifies If Forked

00:02:08

Next thing it will open a page where it identifies that you have forked 'vdm-io/Joomla-Component-Builder-Snippets'. Master branch as the base. There is only one branch at the moment. Then the head of the fork that you have is over here. 00:02:38 If it indicates that it is 'Able to do a merge', then you are in good shape. Those commit messages you have made are showing up here and exactly every change that was done. You will see that it is changed from 'Layout' to 'Tables'. 00:03:03 It shows that it had been renamed from 'FooTable - (Layout) FooTable.json - FooTable - (Table) FooTable.json'. Nothing of the Snippets have changed, only 'Layout' and 'Table' and the 'Date'(to see last change to the file). A new description has been added to'usage'. 00:03:30 That means if the link 'Added the accordion snippet' is used, and '788fc92'is clicked, you will see that is exactly what he did. It added the Accordion snippet, and the same goes for every one of these commit messages. 00:03:56 Good commit messages will make it so much easier for us to review the changes and to make sure that it is correct. If it is very complicated and difficult this kind of pull request will take longer.

Commit Smaller Amount of Snippets Instead Of Bulk

00:04:08

Doing smaller amounts of snippet contributions instead of bulk would be better unless you are already a trusted member of the community. If you have not done any of these before, maybe take smaller steps at first until we are confident that you are a good contributor to this project. No pull request has yet been made.

Click On Create Pull Request - Summarize Pull Request

00:04:41

This is the page where it starts. Click on this 'Create pull request'. This will open in an area in which you should give information on what would sort of summarize this pull request. If it is like a new library, for example, 3, 4, 5, snippets to a new library, then just put that as the title. Whatever would be enough to give those that need to review this just enough information to know what is happening and what is coming in, especially if there is some specific detail. 00:05:23 In future some documents will be added to this repository which will give demo names and stuff in this field, for you to know what to put in there.

Title - Demonstration Of Snippet Contribution

00:05:43

I am just going to write: 'Demonstration of snippet contribution'. You will not be able to make changes here. It is only the admin that can add in 'Reviewer', 'Assign', 'Label', 'Project' and 'Milestone'. That will be the responsibility of the admin. They might not do it but if it is a big contribution we might probably make use of these tools.

Description - Use Commit Messages

00:06:27

The commit messages can be used as the 'Description' or that which we will maybe set up in the future. We will create a pull request and just give another glance at it to see that everything is fine, click 'Create pull request'. We now have the pull request and it is here where the admin will get involved. You cannot take it further and rightly because we want to protect this repository. We want to make sure only good well-documented, well explained, well named, snippets are contributed.00:07:17 Once you have come to this point, you will have to wait for one of our admin to get back to you and if they have issues, they will start discussing it with you and ask questions. 00:07:40 We want to protect you and protect everyone else, so do not be upset if they have questions. Be glad that they would, that will ensure that all of us will enjoy this infrastructure. Once everyone is satisfied there will be some reviewers that will sign off on this pull request. 00:08:05 At this stage if we have two reviewers sign off on it, at least then we can merge it into the master branch.

Different Ways To Merge Into The Master Branch

00:08:19

Now there are different ways of how the merging into the master branch is done. I am doing this part mostly for the admin, who may need to be able to do this. You could do it here on GitHub. Just click 'Merge pull request'. Since there are no conflicts, if there are conflicts then it gets more complicated and usually, we will need more advanced admin guys who know Git better to maybe in a command-line resolve some of this.

Command Line Instructions

00:08:54

You can click on 'command-line instructions' link and it will show you the command line way of dealing with it or you could select one of these various merging options. This will be explained in a tutorial that is specifically directed at the further steps that are necessary for admins. 00:09:12 Whereas regarding you as a contributor, this is really where you end and we take over. We want to tell you once the contribution is accepted is merged in, it will again become visible in JCB, in the Snippet Get area, which we demonstrated when we gave an overview of how things work. 00:09:35

Focus - Managing Snippets

00:09:52

The focus is to enable us to enlarge the Snippet area without really intruding on bond-constant-updates in database tricks to share the Snippets. But instead, have this easy way of maintaining a GitHub repository, which in effect will then be accessible via the JCB Get area where you can add new Snippets. You can delete Snippets, 00:10:24 and go to the Snippets area and come in Snippets and click 'Accordion' and 'Trash' the snippet. Then go to 'Trashed' and completely delete the snippet(Accordion) from your repository which will then cause the snippet to 00:10:45 be seen as non-existent in your Snippets area. There are ways to remove duplicates.

Share Snippets with the rest of the community and at the same time get your name out there. Since looking at the files changed, you will see that this new snippet, it seems like it just did what it was supposed to do. Because my name is on most of these, it is because I added them and that is why my name is on there. You are also able to add your name in here because you are adding Snippets. 00:11:37 I am looking forward to seeing all of you getting involved in this area as well.