diff --git a/048-Tutorial-on-making-a-pull-request-at-Joomla-Component-Builder-Snippets.md b/048-Tutorial-on-making-a-pull-request-at-Joomla-Component-Builder-Snippets.md index 6c8d2a4..8d0cc96 100644 --- a/048-Tutorial-on-making-a-pull-request-at-Joomla-Component-Builder-Snippets.md +++ b/048-Tutorial-on-making-a-pull-request-at-Joomla-Component-Builder-Snippets.md @@ -1,4 +1,43 @@ # MAKING A PULL REQUEST AT JOOMLA COMPONENT BUILDER SNIPPETS +### Should Be Able To Do: Updating Snippets, Forking, Cloning, Unzipping A Package, Updating Files, Committing Changes With Messages, Pushing It Up, Ensure Your Branch Is In Sync With Upstream Branch -I'm going to demonstrate to you the process of taking your committed changes to your forked version. it's this one Not the master branch How is gonna be little different for you because of course I am a [00:00:20](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m20s) Administrator of the master branch So I'll see things that you maybe won't see But Moreless you should be able to actually make a pull request And If you're not able to please let us know So that I can Make sure that you're able to Do that And [00:00:41](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m41s) There will be more guys involved in managing these Snippets So it's not only myself that will be responding to issues But 4 most part if there is really a holdup I'll come in and help Make sure that everything Works as we expect So you should be able to after having Done What we've explained in the previous tutorial you know [00:01:08](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m08s) Updating the snippets , getting out a forked version Of the repository cloning it down and offline And then basically it Unzipping the package into that repository Updating those files committing those changes with messages And then pushing it up here after you have ensured that your branch is in sync with the upstream branch Ok That if you don't understand Please go back watch that tutorial it is the previous one the playlist [00:01:40](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m40s) On YouTube And then this one now Will be First steps Basically I'm off doing a pull request So once you are in your repository on GitHub And you have Push your changes up here you'll see this you know Message [00:02:01](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m01s) And be able to click on Pull request So We've done that Next thing it will open a page Where Basically Identifies That you have forked [00:02:18](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m18s) VDM-Io/ Joomla-Component-Builder.... Snippets Master branch As the base there's only one branch at the moment And Then Your head Of the fork that you've got is over here [00:02:38](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m38s) And if it's says to you that it's able to do a merge Then You're in good shape everything shouldn't Be more complicated You also now see that those commit messages you've made Are now actually also showing up here And exactly every change that was done so basically you see we changed it From layout To tables And it [00:03:03](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m03s) shows you that we've renamed it from this to that So it actually identified that for us And if we can see ok nothing of the Snippets have changed You can scroll and see the snippet Isn't changed only those and the date Which is good for we want to Be able to see when was the last change to the file Here we can see that usage had A new [00:03:30](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m30s) Description added So that means if I was to now actually click On this link Added the accordion snippet Click there You see ok that's exactly what he did added accordion snippet And The same goes for every one of these commit messages And that's really what I meant when I said Giving good commit messages [00:03:56](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m56s) You 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 Usually this kind of pull request will take longer So doing smaller amounts of snippet Contributions in of stead of whole bulk I suppose Would be Better Unless you already a trusted member in the community then I'll suppose it will go easier So yeah if you haven't done any of these before maybe take smaller steps at first [00:04:29](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m29s) Until we get to know you and until we more Confident that you Are a good contributor to do this project Yeah so trust is important for us So we'll be able to check this now no pull request has yet been made We've just come to the Page of where it starts You actually need to click on this create pull request This will now open in area Which You should give us information [00:04:59](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m59s) Of What would sort of summarise This pull request So if it's like a new library let's say 3 4 5 snippets to a new library Then just put that as the title Whatever would be enough To actually give those That needs to review This just enough information to know what's happening And what's coming in specially If there is some [00:05:23](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m23s) Specific detail now I know That we will In time at some Documents to this repository Which will give you sort of Demo Names and stuff in this field So that you will know what to put in there So that will still come so for now I'm just gonna say Illustration of snippet contribution [00:05:50](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m50s) Now I don't think you'll be able to make changes here It's only the admin that actually has the ability to actually add a reviewer And Assign a label and A project that a milestone And so that will be the responsibility of the admin They might not do it They might feel I will just merges and we don't need to make much fuss of it But if it's a big contribution and they need to be some real you know [00:06:22](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m22s) Work done here We must probably make use of these tools The description We could either just use the Commit messages as the description All like I said That which we will maybe set up in the In the future We will now then create the pull request And [00:06:47](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m47s) Just given another glance and say ok everything is fine and click create pull request When I now have the pull request and really here Is where we as the admin Will now get involved You cannot really take it further And Rightly so because we want to Protect this repository We wanna make sure only good ....... [00:07:17](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m17s) Well-documented, Well explained, well named, Snippets are contributed And so once you have come to this point You'll have to wait for one of our admin To get back to you and actually If they have issues they will start discussing it with you Ask questions And please We wanna just [00:07:40](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m40s) Protect you and protect everyone else So don't Be upset if they have questions In fact be glad that they would That will ensure that all of us Will enjoy this infrastructure So Once everything is satisfied and everyone is happy There will be some reviewers that will sign off On this pull request [00:08:05](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m05s) And I think at this stage if we have two reviewers sign off on it At least Then we can merge it into the master branch Now there are different ways on how the merging into the master branch is done This is mostly related and I'm 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 is no conflicts If there is conflicts then it gets more complicated [00:08:41](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m41s) And usually we will need more advanced admin Guys who knows Git better Two maybe in a command line Be able to resolve some of this You can click on this link here and it will show you the command line Way of dealing with it Or You could select One of these various emerging options Now all of that I'll explain more in editorial that's just specifically directed [00:09:12](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m12s) At the further steps that is necessary for admins Where us regarding You as a contributor This is really where you end And We take over Now Wanna tell you that Once the contribution is accepted and it's merged in Then it will again become visible [00:09:35](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m35s) In JCB In the snippet get area Which we demonstrated when we started out giving an overview of how things work And really that's what it's about it's really all of this complexity that we've now discussed Is Not the main focus The Focus is to Enable us to Enlarge the snippet [00:09:58](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m58s) Area Without Really intruding Upon 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 When you can add new Snippets You can obviously delete snippets [00:10:24](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m24s) Just going to the Snippets area You can come in there and click here and trash a snippet And Then go to Trashed And here Completely delete the snippet from your repository Which will then Cause the snippet to [00:10:45](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m45s) Be seen as non existent in your snippets area And so there are ways to remove duplicates And I don't wanna go into a very long explanation again On how to get Snippets area works But Our expectation is that some of you would feel yeah I wanna contribute Share Snippets with the rest of the community and in the same time Get your name Out there since looking at the files changed [00:11:14](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m14s) You see that this new snippet As Yeah it looks like it just did what it's been doing you now because my name is on most of these What is because I added them And that's why my name is on there And so You are now also able to Add your name in here because you are adding Snippets And that's really the idea Well [00:11:37](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m37s) So we come to the end of this tutorial Thank you for watching And I'm looking forward to seeing all of you getting involved In this area as well +* Watch Previous Tutorial + +I'm going to demonstrate to you the process of taking your committed changes to your forked version. It's this one, not the master branch. It is going to be a little different for you because I am an [00:00:20](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m20s) administrator of the master branch. I'll see things that you maybe won't see. But more or less you should be able to make a pull request and if you're not able to please let us know so that I can make sure that you're able to do that. [00:00:41](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m41s) There will be more guys involved in managing these Snippets. It's not only myself that will be responding to issues but for most part, if there is really a holdup, I'll come in and help make sure that everything works as we expect. You should be able to after having done what we've explained in the previous tutorial, [00:01:08](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m08s) updating the snippets, getting out a forked version Of the repository, cloning it down offline, and then unzipping the package into that repository, updating those files, committing those changes with messages. Then pushing it up here after you have ensured that your branch is in sync with the upstream branch. If you don't understand, please go back, watch that tutorial, it is the previous one in the playlist [00:01:40](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m40s) on YouTube. + +### Your Messages Was Committed + +This one will be the first steps of doing a pull request. Once you are in your repository on GitHub and you have push your changes up here, you'll see the message 'This branch is 4 commits ahead of vdm-io:master.' [00:02:01](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m01s) and be able to click on Pull request. We've done that. + +### Identifies If Forked + +Next thing it will open a page where it identifies that you have forked vdm-io/Joomla-Component-Builder-Snippets. [00:02:18](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m18s) Master branch as the base. There's only one branch at the moment. Then your head of the fork that you've got is over here. [00:02:38](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m38s) If it's says to you that it's 'Able to do a merge', then you're in good shape everything shouldn't be more complicated. You can see that those commit messages you've made are showing up here and exactly every change that was done. You will see we changed it from Layout to Tables. [00:03:03](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m03s) It shows you that we've renamed it from FooTable - (Layout) FooTable.json - FooTable - (Table) FooTable.json. It identified that for us. We can see nothing of the Snippets have changed. You can scroll and see the snippet isn't changed, only Layout and Table and the date. Which is good for we want to be able to see when was the last change to the file. We can see that usage has a new [00:03:30](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m30s) description added. That means if I was to click on the link 'Added the accordion snippet', click there '788fc92' you will see that's exactly what he did. Added accordion snippet, and the same goes for every one of these commit messages. That's what I meant when I said giving good commit messages [00:03:56](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m56s) 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 usually this kind of pull request will take longer. + +### Commit Smaller Amount of Snippets Instead Of Bulk + +Doing smaller amounts of snippet contributions in of stead of whole bulk I suppose would be better, unless you already a trusted member in the community then I'll suppose it will go easier. If you haven't done any of these before, maybe take smaller steps at first [00:04:29](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m29s) until we get to know you and until we are more confident that you are a good contributor to do this project. Trust is important for us so we'll be able to check this. No pull request has yet been made. + +### Click On Create Pull Request - Summarize Pull Request + +We've just come to the page of where it starts. You need to click on this create pull request. This will open in an area which you should give us information [00:04:59](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m59s) of what would sort of summarize this pull request. If it's like a new library, let's say 3, 4, 5, snippets to a new library, then just put that as the title. Whatever would be enough to give those that needs to review this just enough information to know what's happening and what's coming in, especially if there is some [00:05:23](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m23s) specific detail. That we will in time add some documents to this repository which will give you demo names and stuff in this field, so that you will know what to put in there. That will still come. + +### Title - Demonstration Of Snippet Contribution + +I'm just going to say: Demonstration of snippet contribution. [00:05:50](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m50s) I don't think you'll be able to make changes here. It's only the admin that has the ability to add in Reviewer, Assign, Label, Project and Milestone. That will be the responsibility of the admin. They might not do it. They might feel I will just merges and we don't need to make much fuss of it, but if it's a big contribution and they need to be some real [00:06:22](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m22s) work done, we must probably make use of these tools. + +### Description - Use Commit Messages + +The description, we could either just use the commit messages as the description, or like I said that which we will maybe setup in the future. We will then create the pull request and [00:06:47](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m47s) just give another glance and say: everything is fine, click 'Create pull request'. We now have the pull request and here is where we as the admin will get involved. You cannot really take it further and rightly because we want to protect this repository. We want to make sure only good [00:07:17](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m17s) well-documented, well explained, well named, snippets are contributed. Once you have come to this point, you'll 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. Ask questions and please we want to [00:07:40](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m40s) protect you and protect everyone else. So don't be upset if they have questions. In fact be glad that they would that will ensure that all of us will enjoy this infrastructure. Once everything is satisfied and everyone is happy there will be some reviewers that will sign off on this pull request. [00:08:05](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m05s) 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 + +Now there are different ways on how the merging into the master branch is done. This is mostly related and I'm 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 is no conflicts, if there are conflicts then it gets more complicated [00:08:41](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m41s) and usually we will need more advanced admin guys who knows Git better to maybe in a command line be able to resolve some of this. + +### Command Line Instructions + +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 emerging options. All of that I'll explain more in a tutorial that's just specifically directed [00:09:12](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m12s) at the further steps that is necessary for admins. Where us regarding you as a contributor, this is really where you end and we take over. We want to tell you that once the contribution is accepted and it's merged in, then it will again become visible [00:09:35](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m35s) in JCB, in the Snippet Get area, which we demonstrated when we started out giving an overview of how things work. And really that's what it's about, it's really all of this complexity that we've now discussed, is not the main focus. + +### Focus - Managing Snippets + +The focus is to enable us to enlarge the Snippet [00:09:58](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m58s) area without really intruding 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. When you can add new Snippets. You can obviously delete Snippets, [00:10:24](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m24s) and going to the Snippets area. You can 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](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m45s) be seen as non existent in your Snippets area. There are ways to remove duplicates. I don't want to go into a very long explanation again on how Snippets area works. But our expectation is that some of you would feel I want to contribute, Share Snippets with the rest of the community and in the same time get your name out there. Since looking at the files changed, [00:11:14](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m14s) you will see that this new snippet, it looks like it just did what it's been doing, because my name is on most of these, is because I added them and that's why my name is on there. You are also able to add your name in here because you are adding Snippets and that's really the idea. [00:11:37](https://www.youtube.com/watch?v=vQ-yxVtc-Co&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m37s) I'm looking forward to seeing all of you getting involved in this area as well.