Contribute to Open Source
How to Submit xRunBooks and Actions to Github
If you have created a xRunBook in the SAAS/Sandbox, select the xRunBook's 3 dot menu and choose "Download."
the xRUnbook list
The Three dot menu:
Now that your file is downloaded, we'll need to make a few edits.
In each Action of the runbook, there are a number of task.configure blocks.
1. Delete all blocks with credential data. Users will enter their own credentials, and do not need to see yours.
2. For any inputs that are "hardcoded" meaning you enter inputs as values, and not as variables - delete these inputs. If your inputs &outputs are variables that are defined and used elseqhere - leave them in. Once the edits are saved, copy the xRunBook into the folder for the connector your xRunBook uses (for example GCP or AWS).
You'll need to create a <runbook name>.json file. This JSON has several attributes:
- Name: the name of your xRunBook
- Description: a detailed description of your runbook.
- uuid: A unique Id. Generate this using the description value, and running:
echo "DESCRIPTION OF THE RUNBOOK" | shasum -a 256
- icon: The connector type
- categories: the categories of the xRunBook.
- connector_types: The connector type
- version: The version
Save this JSON file. With these 2 files, create a branch of the repo, and submit a PR.
To submit a custom Action, first create a working version in unSkript. To create an Action that can be submitted to Open Source:
- 2.Rename the folder, and the .py and .json files with teh same name - that describes your action (for example: "aws_get_ec2_instance_age")
- 3.Next we'll edit the files. Copy the Python code of your Action into the .py file.
class InputSchema(BaseModel):region: str = Field(title='Region',description='AWS Region of the ECS service')
- 1.Add a Class called InputSchema that describes the inputs for your action:
- 4.Now Edit the JSON file:
- 1.Name: the Name of your Action,
- 2.Description: the Description
- 3.Type: what connector will it use (ex: "LEGO_TYPE_AWS")
- 4.Entry Function: The name of the function called to run the Action.
- 5.Needs Credential: Boolean
- 6.Output_Type: Dict, Array, String
- 7.Supports polling: Boolean
- 8.Supports Iteration: Boolean
- 5.Write a readme file. Attach images (save in the same directory) if helpful.
- 6.Once these files are completed, create a fork of the repo, and submit a PR to the Master branch. The unSkript team will promptly review your Action and provide comments, or accept your submission.