Skip to content

Bug in CreateOrUpdateRepoCustomPropertyValues? #3021

@peter-aglen

Description

@peter-aglen

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)
}

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).bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions