Upload a Script from GitHub

CAR provides integration with GitHub for scripts. You can import scripts from private as well as public GitHub repositories. 

Importing a script from Github

1. Select the Import from GitHub option.

2. From the Type drop-down, specify whether you want to import from a private repository or a public repository.

The following options are displayed if you select Private Repository

URL

  • In the URL text box, enter the URL of the file/folder for the GitHub private repository.
  • In the Access Token text box, enter the token to access the private repository you have specified.

It is recommended that you provide an access token that has no expiration limit.

Path Parameters

  • In the Owner text box, enter the username of the GitHub repository. 
  • In the Repository name text box, enter the name of the private repository that you want to access.
  • In the Branch text box, provide the branch name of the repository from which the file is to be imported. This is an optional requirement.
  • In the Access Token text box, enter the token to access the private repository you have specified.

It is recommended that you provide an access token that has no expiration limit.

 

The following options are displayed if you select Public Repository

URL

  • In the URL text box, enter the URL of the file or folder for the GitHub public repository.

Path Parameters

  • In the Owner text box, enter the username of the GitHub repository. 
  • In the Repository name text box, enter the name of the public repository that you want to access.
  • In the Branch text box, provide the branch name of the repository. This is an optional requirement.

 

3. Click Fetch Script

4. Slide the Sync the script with GitHub toggle button to sync the script with GitHub. 

- Select On Demand if you want to choose manual sync.

- Select Automated if you want your scripts to sync automatically with the GitHub repository, which occurs every four hours.

The On Demand option is selected by default. 

Even if you select the Automated option, you can initiate an on-demand sync with GitHub at any point from the Scripts tab by selecting Quick Actions > Sync with GitHub now. Similarly, you can disable auto-sync by selecting Quick Actions > Disable auto sync.  

7. Select Create script in approved state if you want the script to be ready for execution without approval. This option is available only to the Manager user accounts.

8. Type "I have reviewed the script and accept the risk" in the Risk Acceptance text box and then click Next

If the script is not created in an approved state, it is listed as 'Pending Test' on the Scripts tab.

9. In the Review and Confirm page, review the information and then click Confirm & Save to create the script. The newly created script will be listed on the Script tab.

 

Go back to Creating Scripts