Script for generating a custom-properties schema to be used in conjunction with PandasWhoCode action: Configure Custom Properties
You must be authenticated with GitHub and have permission to view the organization's properties.
This script will generate a custom_props.json
file that can be used to set custom properties
for your GitHub organization using the existing custom properties of your organization (or another
which you have appropriate permissions to view)
- Clone this Github repository
- Execute the
generate-custom-properties-schema.sh
script to create acustom_props.json
file. - Move the
custom_props.json
file to the.github
directory of your repository.
Ensure these tools are installed and available in your PATH
.
Name | Description | Required | Default |
---|---|---|---|
-o |
Github Organization/Owner name | ✅ Yes | — |
-n |
Name for the output file | ❌ No | custom_props.json |
-h |
Show help | ❌ No | — |
./generate-custom-properties-schema.sh -o ORG [-n FILENAME]
git clone --depth 1 https://github.com/PandasWhoCode/generate-custom-properties-schema.git
cd generate-custom-properties-schema
gh auth login # follow the prompts, ensure you are logged into gh cli
./generate-custom-properties-schema.sh -o MyOrganization -n my-custom-props.json
cp my-custom-props.json <path_to_your_repo>/.github/my-custom-props.json
custom_props.json
:
{
"properties": [
{
"property_name": "single_select_property",
"value_type": "single_select",
"allowed_values": [
"option-1",
"option-2",
"option-3",
"option-4"
],
"description": "Default single select property",
"values_editable_by": "org_and_repo_actors",
"required": false
},
{
"property_name": "multi_select_property",
"value_type": "multi_select",
"allowed_values": [
"option-1",
"option-2",
"option-3",
"option-4"
],
"description": "Default multi select property",
"values_editable_by": "org_and_repo_actors",
"required": false
},
{
"property_name": "text_property",
"value_type": "string",
"description": "Default 'text' property type",
"values_editable_by": "org_and_repo_actors",
"required": false
},
{
"property_name": "bool_test",
"value_type": "true_false",
"description": "Default true-false property type",
"values_editable_by": "org_and_repo_actors",
"required": false
}
]
}
Roger Barker