Skip to content

Commit 3e0f027

Browse files
committed
fixup! feat: Improve support for custom property defaults
1 parent ac6aacb commit 3e0f027

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

github/enterprise_properties_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func TestEnterpriseService_GetAllCustomProperties(t *testing.T) {
5555
PropertyName: Ptr("name"),
5656
ValueType: PropertyValueTypeSingleSelect,
5757
Required: Ptr(true),
58-
DefaultValue: Ptr("production"),
58+
DefaultValue: "production",
5959
Description: Ptr("Prod or dev environment"),
6060
AllowedValues: []string{"production", "development"},
6161
ValuesEditableBy: Ptr("org_actors"),
@@ -178,7 +178,7 @@ func TestEnterpriseService_GetCustomProperty(t *testing.T) {
178178
PropertyName: Ptr("name"),
179179
ValueType: PropertyValueTypeSingleSelect,
180180
Required: Ptr(true),
181-
DefaultValue: Ptr("production"),
181+
DefaultValue: "production",
182182
Description: Ptr("Prod or dev environment"),
183183
AllowedValues: []string{"production", "development"},
184184
ValuesEditableBy: Ptr("org_actors"),
@@ -222,7 +222,7 @@ func TestEnterpriseService_CreateOrUpdateCustomProperty(t *testing.T) {
222222
property, _, err := client.Enterprise.CreateOrUpdateCustomProperty(ctx, "e", "name", &CustomProperty{
223223
ValueType: PropertyValueTypeSingleSelect,
224224
Required: Ptr(true),
225-
DefaultValue: Ptr("production"),
225+
DefaultValue: "production",
226226
Description: Ptr("Prod or dev environment"),
227227
AllowedValues: []string{"production", "development"},
228228
ValuesEditableBy: Ptr("org_actors"),
@@ -235,7 +235,7 @@ func TestEnterpriseService_CreateOrUpdateCustomProperty(t *testing.T) {
235235
PropertyName: Ptr("name"),
236236
ValueType: PropertyValueTypeSingleSelect,
237237
Required: Ptr(true),
238-
DefaultValue: Ptr("production"),
238+
DefaultValue: "production",
239239
Description: Ptr("Prod or dev environment"),
240240
AllowedValues: []string{"production", "development"},
241241
ValuesEditableBy: Ptr("org_actors"),

github/event_types_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13732,7 +13732,7 @@ func TestCustomPropertyEvent_Marshal(t *testing.T) {
1373213732
ValueType: PropertyValueTypeSingleSelect,
1373313733
SourceType: Ptr("enterprise"),
1373413734
Required: Ptr(true),
13735-
DefaultValue: Ptr("production"),
13735+
DefaultValue: "production",
1373613736
Description: Ptr("Prod or dev environment"),
1373713737
AllowedValues: []string{"production", "development"},
1373813738
ValuesEditableBy: Ptr("org_actors"),

github/orgs_properties_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func TestOrganizationsService_GetAllCustomProperties(t *testing.T) {
6262
PropertyName: Ptr("name"),
6363
ValueType: PropertyValueTypeSingleSelect,
6464
Required: Ptr(true),
65-
DefaultValue: Ptr("production"),
65+
DefaultValue: "production",
6666
Description: Ptr("Prod or dev environment"),
6767
AllowedValues: []string{"production", "development"},
6868
ValuesEditableBy: Ptr("org_actors"),
@@ -81,7 +81,7 @@ func TestOrganizationsService_GetAllCustomProperties(t *testing.T) {
8181
ValueType: PropertyValueTypeURL,
8282
Required: Ptr(true),
8383
Description: Ptr("Link to the documentation"),
84-
DefaultValue: Ptr("https://example.com/docs"),
84+
DefaultValue: "https://example.com/docs",
8585
},
8686
}
8787
if !cmp.Equal(properties, want) {
@@ -192,7 +192,7 @@ func TestOrganizationsService_GetCustomProperty(t *testing.T) {
192192
PropertyName: Ptr("name"),
193193
ValueType: PropertyValueTypeSingleSelect,
194194
Required: Ptr(true),
195-
DefaultValue: Ptr("production"),
195+
DefaultValue: "production",
196196
Description: Ptr("Prod or dev environment"),
197197
AllowedValues: []string{"production", "development"},
198198
ValuesEditableBy: Ptr("org_actors"),
@@ -236,7 +236,7 @@ func TestOrganizationsService_CreateOrUpdateCustomProperty(t *testing.T) {
236236
property, _, err := client.Organizations.CreateOrUpdateCustomProperty(ctx, "o", "name", &CustomProperty{
237237
ValueType: PropertyValueTypeSingleSelect,
238238
Required: Ptr(true),
239-
DefaultValue: Ptr("production"),
239+
DefaultValue: "production",
240240
Description: Ptr("Prod or dev environment"),
241241
AllowedValues: []string{"production", "development"},
242242
ValuesEditableBy: Ptr("org_actors"),
@@ -249,7 +249,7 @@ func TestOrganizationsService_CreateOrUpdateCustomProperty(t *testing.T) {
249249
PropertyName: Ptr("name"),
250250
ValueType: PropertyValueTypeSingleSelect,
251251
Required: Ptr(true),
252-
DefaultValue: Ptr("production"),
252+
DefaultValue: "production",
253253
Description: Ptr("Prod or dev environment"),
254254
AllowedValues: []string{"production", "development"},
255255
ValuesEditableBy: Ptr("org_actors"),

0 commit comments

Comments
 (0)