-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Bug in CreateOrUpdateRepoCustomPropertyValues? #3021
Copy link
Copy link
Closed
Labels
Breaking API ChangePR will require a bump to the major version num in next release. Look here to see the change(s).PR will require a bump to the major version num in next release. Look here to see the change(s).bug
Description
We are looking to replace our custom-built methods for listing and updating custom property values, with the methods provided in v57.
It seems the CreateOrUpdateRepoCustomPropertyValues method has a bug however. We haven't actually tested it yet, but shouldn't the last argument be properties []*CustomPropertyValue?
// Wrong type in last arg?
func (s *OrganizationsService) CreateOrUpdateRepoCustomPropertyValues(ctx context.Context, org string, repoNames []string, properties []*CustomProperty) (*Response, error) {
u := fmt.Sprintf("orgs/%v/properties/values", org)
params := struct {
RepositoryNames []string `json:"repository_names"`
Properties []*CustomProperty `json:"properties"`
}{
RepositoryNames: repoNames,
Properties: properties,
}
req, err := s.client.NewRequest("PATCH", u, params)
if err != nil {
return nil, err
}
return s.client.Do(ctx, req, nil)
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Breaking API ChangePR will require a bump to the major version num in next release. Look here to see the change(s).PR will require a bump to the major version num in next release. Look here to see the change(s).bug