GitHub Integration
Trillo Workbench integrates with the GitHub. It is useful for storing code (metadata and functions) and for deployment in a new environment such as from development to staging, staging to production.
Last updated
Trillo Workbench integrates with the GitHub. It is useful for storing code (metadata and functions) and for deployment in a new environment such as from development to staging, staging to production.
Last updated
By default code is saved and versioned in the Trillo Workbench database (which is backed up regularly). The git integration has several benefits such as branching, peer review, pull requests, reporting, etc. Trillo Workbench also uses git for deployment of code from one environment to another. Once code is pushed from an environment, it can be deployed in a different environment by git pull.
Using git requires one time set up to link Trillo Workbench instance with the GitHub. It is described below. After that a user can perform push and pull.
The linking Trillo WOrkbench and GitHub is a 3 steps process.
Create an OAuth application in GitHub.
Configuring Trillo Workbench with the GitHub credentials.
Connect and login to GitHub (using GitHub's login screen) so the Trillo Workbench can acquire a token for API calls.
In order to use APIs of GitHub from the Trillo Workbench, you need to create an OAuth application to GitHub. It is explained in this documentation - Creating an OAuth application with GitHub. You will require the internet accessible URL of the Trillo Workbench to register your application.
The steps described in the document are repeated here for convenience. Even if they have changed since, the principles remain the same.
First login into your GitHub account and click on settings.
Click on the developer settings as shown below
Proceed to creating a new OAuth application
Enter the workbench URL (accessible over the internet) at two places as shown below.
Next generate the client secret as shown below.
Note down client ID and secret securely on your machine (recommended to delete then after entering into the workbench).
In order to configure Trillo Workbench you need following information:
GitHub credentials of the OAuth application created in previous step.
A name of repository in the GitHub. Let us use "MyApplication" as the name in the example below.
Enter these information in the form of Trillo Workbench UI shown below.
Enter 'Save'. It will save information securely in the Trillo Workbench server.
Once you configure Trillo Workbench with GitHub info, the Settings navigation item becomes visible. Select it and then click on Connect with Git Account. It will initiate the authorization workflow with GitHub to obtain an access token.
Clicking on Connect with Git Account will navigate you to the following login page on the GitHub website.
Click on the Authorize saawan ('saawan' will be replaced by your GitHub id). Once you authorize, the control will be transferred back to the Trillo Workbench. Using the "code" provided in redirect URL, the Trillo Workbench will acquire an access token and redisplay its Git page. Now the Trillo Workbench page would look like as shown below.
Once the above setup is completed, users can perform git push and pull operations as shown below.
A user can push code to the GitHub using the following screen. It will create a branch with your user id as the name of the branch. You can create a peer review request using GitHub UI and merge it.
Alternatively the can push through your branch create a pull request and merge the pull request into the master branch.
Check your task history at the end of the operation the logs will be shown highlighting the details of this operation.
You can check operation result on the GitHub by clicking on "Browse on GitHub"
Similar to Push, a user can initiate the Git Pull flow. The interaction for the Git Pull are simple. The Trillo Workbench asks for the confirmation of action and initiates a background task to pull the code from the connect Git repository into Trillo Workbench.
Since Git Pull overwrites code in the Trillo Workbench, this action is available only to a user with "admin" role.