@@ -40,6 +40,13 @@ func TestOrganizationsService_GetAllCustomProperties(t *testing.T) {
4040 "property_name": "team",
4141 "value_type": "string",
4242 "description": "Team owning the repository"
43+ },
44+ {
45+ "property_name": "documentation",
46+ "value_type": "url",
47+ "required": true,
48+ "description": "Link to the documentation",
49+ "default_value": "https://example.com/docs"
4350 }
4451 ]` )
4552 })
@@ -53,7 +60,7 @@ func TestOrganizationsService_GetAllCustomProperties(t *testing.T) {
5360 want := []* CustomProperty {
5461 {
5562 PropertyName : Ptr ("name" ),
56- ValueType : "single_select" ,
63+ ValueType : PropertyValueTypeSingleSelect ,
5764 Required : Ptr (true ),
5865 DefaultValue : Ptr ("production" ),
5966 Description : Ptr ("Prod or dev environment" ),
@@ -62,13 +69,20 @@ func TestOrganizationsService_GetAllCustomProperties(t *testing.T) {
6269 },
6370 {
6471 PropertyName : Ptr ("service" ),
65- ValueType : "string" ,
72+ ValueType : PropertyValueTypeString ,
6673 },
6774 {
6875 PropertyName : Ptr ("team" ),
69- ValueType : "string" ,
76+ ValueType : PropertyValueTypeString ,
7077 Description : Ptr ("Team owning the repository" ),
7178 },
79+ {
80+ PropertyName : Ptr ("documentation" ),
81+ ValueType : PropertyValueTypeURL ,
82+ Required : Ptr (true ),
83+ Description : Ptr ("Link to the documentation" ),
84+ DefaultValue : Ptr ("https://example.com/docs" ),
85+ },
7286 }
7387 if ! cmp .Equal (properties , want ) {
7488 t .Errorf ("Organizations.GetAllCustomProperties returned %+v, want %+v" , properties , want )
@@ -109,12 +123,12 @@ func TestOrganizationsService_CreateOrUpdateCustomProperties(t *testing.T) {
109123 properties , _ , err := client .Organizations .CreateOrUpdateCustomProperties (ctx , "o" , []* CustomProperty {
110124 {
111125 PropertyName : Ptr ("name" ),
112- ValueType : "single_select" ,
126+ ValueType : PropertyValueTypeSingleSelect ,
113127 Required : Ptr (true ),
114128 },
115129 {
116130 PropertyName : Ptr ("service" ),
117- ValueType : "string" ,
131+ ValueType : PropertyValueTypeString ,
118132 },
119133 })
120134 if err != nil {
@@ -124,12 +138,12 @@ func TestOrganizationsService_CreateOrUpdateCustomProperties(t *testing.T) {
124138 want := []* CustomProperty {
125139 {
126140 PropertyName : Ptr ("name" ),
127- ValueType : "single_select" ,
141+ ValueType : PropertyValueTypeSingleSelect ,
128142 Required : Ptr (true ),
129143 },
130144 {
131145 PropertyName : Ptr ("service" ),
132- ValueType : "string" ,
146+ ValueType : PropertyValueTypeString ,
133147 },
134148 }
135149
@@ -176,7 +190,7 @@ func TestOrganizationsService_GetCustomProperty(t *testing.T) {
176190
177191 want := & CustomProperty {
178192 PropertyName : Ptr ("name" ),
179- ValueType : "single_select" ,
193+ ValueType : PropertyValueTypeSingleSelect ,
180194 Required : Ptr (true ),
181195 DefaultValue : Ptr ("production" ),
182196 Description : Ptr ("Prod or dev environment" ),
@@ -220,7 +234,7 @@ func TestOrganizationsService_CreateOrUpdateCustomProperty(t *testing.T) {
220234
221235 ctx := t .Context ()
222236 property , _ , err := client .Organizations .CreateOrUpdateCustomProperty (ctx , "o" , "name" , & CustomProperty {
223- ValueType : "single_select" ,
237+ ValueType : PropertyValueTypeSingleSelect ,
224238 Required : Ptr (true ),
225239 DefaultValue : Ptr ("production" ),
226240 Description : Ptr ("Prod or dev environment" ),
@@ -233,7 +247,7 @@ func TestOrganizationsService_CreateOrUpdateCustomProperty(t *testing.T) {
233247
234248 want := & CustomProperty {
235249 PropertyName : Ptr ("name" ),
236- ValueType : "single_select" ,
250+ ValueType : PropertyValueTypeSingleSelect ,
237251 Required : Ptr (true ),
238252 DefaultValue : Ptr ("production" ),
239253 Description : Ptr ("Prod or dev environment" ),
0 commit comments