Custom Property
Definition of a Custom Property on organization level, the following properties are supported:
| Key | Value | Description | Notes |
|---|---|---|---|
| name | string | The name of the custom property | |
| value_type | string | The type of this property, see Notes about allowed values | string, single_select, multi_select or true_false |
| required | boolean | If this property is required for any repository | |
| default_value | string or list[string] or null | The default value to assign to a repository if the property is required | |
| description | string or null | A description of this property | |
| allowed_values | list[string] or null | The list of allowed values if either single_select or multi_select is used |
Note
Due to a limitation of the GitHub Api, it is not possible to change the value_type of a Custom Property after its creation.
Trying to change the property will result in an error in the plan / apply operation after validation as the change can
only be determined after the live settings have been analyzed.
Jsonnet Function¶
Validation rules¶
- setting
value_typemust be one ofstring,single_select,multi_selectortrue_false, otherwise an error is triggered - using a
value_typeof eithersingle_selectormulti_selectrequires that alsoallowed_valuesis set to a non-empty list - setting
requiredtotruewhiledefault_valueis not set, triggers an error - setting
requiredtofalsewhiledefault_valueis set, triggers an error - the property
allowed_valuesallows a maximum of 200 elements - if setting
allowed_valuesanddefault_valueis set, all defined default values must be in the list of allowed values