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_type
must be one ofstring
,single_select
,multi_select
ortrue_false
, otherwise an error is triggered - using a
value_type
of eithersingle_select
ormulti_select
requires that alsoallowed_values
is set to a non-empty list - setting
required
totrue
whiledefault_value
is not set, triggers an error - setting
required
tofalse
whiledefault_value
is set, triggers an error - the property
allowed_values
allows a maximum of 200 elements - if setting
allowed_values
anddefault_value
is set, all defined default values must be in the list of allowed values