Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion github/orgs_properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type CustomProperty struct {
URL *string `json:"url,omitempty"`
// SourceType is the source type of the property where it has been created. Can be one of: organization, enterprise.
SourceType *string `json:"source_type,omitempty"`
// The type of the value for the property. Can be one of: string, single_select, multi_select, true_false.
// The type of the value for the property. Can be one of: string, single_select, multi_select, true_false, url.
ValueType string `json:"value_type"`
// Whether the property is required.
Required *bool `json:"required,omitempty"`
Expand Down
14 changes: 14 additions & 0 deletions github/orgs_properties_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ func TestOrganizationsService_GetAllCustomProperties(t *testing.T) {
"property_name": "team",
"value_type": "string",
"description": "Team owning the repository"
},
{
"property_name": "documentation",
"value_type": "url",
"required": true,
"description": "Link to the documentation",
"default_value": "https://example.com/docs"
}
]`)
})
Expand Down Expand Up @@ -69,6 +76,13 @@ func TestOrganizationsService_GetAllCustomProperties(t *testing.T) {
ValueType: "string",
Description: Ptr("Team owning the repository"),
},
{
PropertyName: Ptr("documentation"),
ValueType: "url",
Required: Ptr(true),
Description: Ptr("Link to the documentation"),
DefaultValue: Ptr("https://example.com/docs"),
},
}
if !cmp.Equal(properties, want) {
t.Errorf("Organizations.GetAllCustomProperties returned %+v, want %+v", properties, want)
Expand Down
Loading