Updated 063 Proposed Collaborative Workflow in JCB (markdown)

Amigo 2019-11-01 11:23:08 +02:00
parent ecc0c10b81
commit 4799166b8f
1 changed files with 6 additions and 6 deletions

@ -114,37 +114,37 @@ If we are going to make a pull request, we'll most probably will say, 'thank you
[00:24:42](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h24m42s)
If you refresh the page, it'll say that it is 1 commit ahead. Now I think at this point we need to discuss how many changes should you make before you make a Pull request. If 5677 people make the same changes regarding implementing JCBs improvements, who will be accepted, [00:25:09](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h25m09s) and all those kind of things. I suppose it'll still be ironed out as we go. But at this point you could click Pull request. It will automatically take the components and show that it can be merge, then if you click on that Pull request, your comment should usually end up in the title area. We will for every package that we manage, we'll add a Pull request template [00:25:42](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h25m42s) with instructions and how to manage it from here further. At this point you're saying I've made changes to the JCB program, package, whatever you want to call it. These are the changes I have made, test it and please let me know if you like what I've done. [00:26:01](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h26m01s) There will be discussions and please do not be discouraged if it doesn't go quickly. There are reasons for us to always go through things quite slowly and thoroughly. I know in our own in-house developing team, things are going quite fast at this point because we have come to a place of understanding each other's perspective. It goes quickly but working with strangers and people we don't know [00:26:30](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h26m30s) is obviously going to be more difficult and slower. You won't have the option of editing all these values like I do because I actually own this repository. But you most probably will be able to come up to here and put in the necessary information that we will ask for and then click Create Pull Request. If I did that it will create a pull request and [00:26:57](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h26m57s) the developers will be notified and will start communicating from here.
If you refresh the page, it'll say that it is 1 commit ahead. Now I think at this point we need to discuss how many changes should you make before you make a Pull request. If 5-6-7 people make the same changes regarding implementing JCBs improvements, who will be accepted, [00:25:09](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h25m09s) and all those kind of things. I suppose it'll still be ironed out as we go. But at this point you could click, 'Pull request'. It will automatically take the components and show that it can be merged, then if you click on that Pull request, your comment should usually end up in the title area. We will for every package that we manage, we'll add a Pull request template [00:25:42](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h25m42s) with instructions and how to manage it from here further. At this point you're saying I've made changes to the JCB package. These are the changes I have made, test it and please let me know if you like what I've done. [00:26:01](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h26m01s) There will be discussions and please do not be discouraged if it doesn't go quickly. There are reasons for us to always go through things quite slowly and thoroughly. I know in our own in-house developing team, things are going quite fast at this point because we have come to a place of understanding each other's perspective. It goes quickly but working with strangers and people we don't know [00:26:30](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h26m30s) is obviously going to be more difficult and slower. You won't have the option of editing all these values like I do because I actually own this repository. But you most probably will be able to come up to here and put in the necessary information that we will ask for and then click, 'Create Pull Request'. If I did that it will create a pull request and [00:26:57](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h26m57s) the developers will be notified and will start communicating from here.
### What Has Happened So Far
[00:27:02](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h27m02s)
Now when this pull request with your changes have been fully accepted and you haven't made further changes to this component, then the next part of the process needs to happen. If I can illustrate what has happened so far, your first forked the component, then you imported components JCB package, you have made changes, in this case we didn't make changes, but you could have added a new field or a new view. Then compiled it. In your local development you committed to changes to the git repository. Also link [00:27:47](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h27m47s) and commit the changes to git. You have put the changes to the forked version. You have made a Pull request.
Now when this pull request with your changes have been fully accepted and you haven't made further changes to this component, then the next part of the process needs to happen. If I can illustrate what has happened so far, your first forked the component, then you imported components JCB package, you have made changes, in this case we didn't make changes, but you could have added a new field or a new view. Then compile it. In your local development you committed to changes to the Git repository. Also linked [00:27:47](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h27m47s) and commited the changes to Git. You have put the changes to the forked version. You have made a Pull request.
### Contribute To Joomla Component - Finalize - Contribute To JCB Mapped Components
[00:27:58](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h27m58s)
The next step is the place where the Json package manager is going to come into play. Because you want to contribute the changes not only to the actual Joomla Component which already is this pull request, it's contributing it Joomla Component area of the component. When this has been finalized the next step is to contribute it to the JCB Mapped Component. The Next Step is the crucial one because then everybody who's [00:28:33](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h28m33s) helping to develop, the mapped component get this update via JCB package manager.
The next step is the place where the JCB package manager is going to come into play because you want to contribute the changes not only to the actual Joomla Component which already is this pull request, it's contributing it Joomla Component area of the component. When this has been finalized the next step is to contribute it to the JCB Mapped Component. The Next Step is the crucial one because then everybody who's [00:28:33](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h28m33s) helping to develop, the mapped component get this update via JCB package manager.
### Demonstration On The Next Step
[00:28:42](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h28m42s)
We're going to demonstrate the next step. Let's say at this point your commit has been accepted and merged into the root master branch of the repository. Then it should look like this, it will say Merged. If we are going to look at Commit it says: Updated the component with the improvements made by JCB. That was the point which the next step must take place, only once the changes you've made has been accepted in the Joomla Component [00:29:20](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h29m20s) source of the project. The Next Step is to do that with JCB package as well. All VDM JCB packages are kept in the JCB packages repository. The next thing you will need to do is you will need to fork this repository. I have already forked this repository a few days ago, but you'll see that [00:29:47](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h29m47s) it's already 4 commits behind the master branch. I can't really do anything until I get in sync again with this master branch. Making any commits now will mess things up and the first thing I'm going to do is make sure that this group, this repository is in sync with the master branch. This repository needs to be cloned down to my local system. Those of you that have quite a number of repositories and keeping them all in sync, is a pain.
We're going to demonstrate the next step. Let's say at this point your commit has been accepted and merged into the root master branch of the repository. Then it should look like this, it will say: 'Merged'. If we are going to look at Commit it says: Updated the component with the improvements made by JCB. That was the point and the next step must take place, only once the changes you've made has been accepted in the Joomla Component [00:29:20](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h29m20s) source of the project. The Next Step is to do that with JCB package as well. All VDM JCB packages are kept in the JCB packages repository. The next thing you will need to do is you will need to fork this repository. I have already forked this repository a few days ago, but you'll see that [00:29:47](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h29m47s) it's already 4 commits behind the master branch. I can't really do anything until I get in sync again with this master branch. Making any commits now will mess things up and the first thing I'm going to do is make sure that this group, this repository is in sync with the master branch. This repository needs to be cloned down to my local system. For those of you that have quite a number of repositories and keeping them all in sync, it is a pain.
### Shell Script - UpdateForks
[00:30:22](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h30m22s)
We have this little shell script UpdateForks which is very useful. Even if you're going to run the shell script itself, you can at least peek at some of the commands, how to get this done. What it does, it runs to get all the repositories that you have forked and then it updates them. There are a number of [00:30:49](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h30m49s) SSH files that you should have a look at. I'm going to open the UpdateRepos.sh. I have the file open and I realize this is not going to work, unless you are able to understand Bash. You most probably not going to be able to follow this. Let me rather do the commands one at the time [00:31:13](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h31m13s) inside of that Repo. But at least you know that there is a package here and if you do know Bash, then this is most certainly something to try out. It's working very well. I'm using it quite a lot. It's keeping all my forked repositories up to date and in sync with the master branch. If I work with them that are ready and I'm able to jump in and do it. But it's not that hard to do it manually.
We have this little shell script UpdateForks which is very useful. Even if you're going to run the shell script itself, you can at least peek at some of the commands, how to get this done. What it does, it runs to get all the repositories that you have forked and then it updates them. There are a number of [00:30:49](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h30m49s) SSH files that you should have a look at. I'm going to open the UpdateRepos.sh. I have the file open and I realize this is not going to work, unless you are able to understand 'Bash', you most probably not going to be able to follow this. Let me rather do the commands one at the time [00:31:13](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h31m13s) inside of that Repo. But at least you know that there is a package here and if you do know Bash, then this is most certainly something to try out. It's working very well. I'm using it quite a lot. It's keeping all my forked repositories up to date and in sync with the master branch. If I work with them that are ready and I'm able to jump in and do it. But it's not that hard to do it manually.
### First Clone Your Repository
[00:31:48](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h31m48s)
If you haven't cloned down the repository to your local developing environment, then you will need to do that first. Nothing of what I'm going to show you will work unless you've done that. There are a few documentations that GitHub has that helps with this quite a lot. If you have Windows or Mac or Linux, you can go to these URLs or type in Google: update my fork repo and do a search. [00:32:19](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h32m19s) This is a place you want end up at: you must first configure your repo to see the remote upstream. Click on that and do this first. We'll come back to this one. First we are going to check out in our repo what is the remote branches. We will see that it only has this two remote branches and it fetch and pulls from those. [00:32:52](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h32m52s) Now we want to add the remote branch which is the upstream branch. We are going to use $ git remote add upstream https://github.com/ORIGANL_OWNER/ORIGAL_REPOSITORY.git and add the origin https://github.com/YOUR_USERNAME/YOUR_FORK.git. This one must be the original owners name and the original repositories name. Those two values you will need to update. The way to get them is go back to your Repo [00:33:17](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h33m17s) and click on vdm-io/JCB-Packages value. This should take you to the original branch. You can have it by copying the value from Clone or Download. Then you will type: git remote add upstream. [00:33:33](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h33m33s) Like it says there on GitHub. You will use control, shift, v, to paste in a command line. You can also paste with the mouse. There is the repository. I have a little [00:33:54](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h33m54s) change to my SSH which means I use VDM to identify the server name. That is something most of you wouldn't need to do. We'll click enter.
If you haven't cloned down the repository to your local developing environment, then you will need to do that first. Nothing of what I'm going to show you will work unless you've done that. There are a few documentations that GitHub has that helps with this quite a lot. If you have Windows or Mac or Linux, you can go to these URLs or type in Google: update my fork Repo and do a search. [00:32:19](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h32m19s) This is a place you want end up at: you must first configure your Repo to see the remote upstream. Click on that and do this first. We'll come back to this one. First, we are going to check out in our Repo what is the remote branches. We will see that it only has this two remote branches and it fetch and pulls from those. [00:32:52](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h32m52s) Now we want to add the remote branch which is the upstream branch. We are going to use this one `$ git remote add upstream https://github.com/ORIGANL_OWNER/ORIGAL_REPOSITORY.git` and add the original owner. This one is your name `https://github.com/YOUR_USERNAME/YOUR_FORK.git`. This one must be the original owners name and the original repositories name. Those two values you will need to update. The way to get them is go back to your Repo [00:33:17](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h33m17s) and click on vdm-io/JCB-Packages value. This should take you to the original branch. You can have it by copying the value from 'Clone or Download'. Then you will type: `git remote add upstream`. [00:33:33](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h33m33s) Like it says there on GitHub. You will use control, shift, v, to paste in a command line. You can also paste with the mouse. There is the repository. I have a little [00:33:54](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h33m54s) change to my SSH which means I use VDM to identify the server name. That is something most of you wouldn't need to do. We'll click enter. >>>>>>
### Two Remote Branches - First One is The Origin - Second One is the Upstream