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
To import a script from GitHub, follow these steps:
- Select the Import from GitHub option on the Scripts Details page.
- Select a repository Type from the list to specify whether you want to import from a Private or Public Repository.
The following options are displayed if you select Private Repository:
Option Usage 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:
Option Usage 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.
- Click Fetch Script.
- Turn on the Sync the script with GitHub toggle to sync the script with GitHub.
The following options become available:
- On Demand: Select if you want to manually sync the script with GitHub.
- Automated: Select if you want the script to sync automatically with the GitHub repository, which occurs every four hours.
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.
- Select the Create script in approved state checkbox if you want the script to be ready for execution without approval.
This option is available only to the Manager user accounts.
-
Type "I have reviewed the script and accept the risk" in the Risk Acceptance text box and click Next.
If the script is not created in an approved state, it is listed as Pending Test on the Scripts tab.
Return to the main task to continue.