garm/vendor/github.com/google/go-github/v60/github/repos_properties.go
Gabriel Adrian Samfira 97d03dd38d Update dependencies and tests
This commit updates the dependencies, vendor files and updates tests
to take into account changes to the DB driver.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-22 13:39:04 +00:00

33 lines
988 B
Go

// Copyright 2023 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package github
import (
"context"
"fmt"
)
// GetAllCustomPropertyValues gets all custom property values that are set for a repository.
//
// GitHub API docs: https://docs.github.com/rest/repos/custom-properties#get-all-custom-property-values-for-a-repository
//
//meta:operation GET /repos/{owner}/{repo}/properties/values
func (s *RepositoriesService) GetAllCustomPropertyValues(ctx context.Context, org, repo string) ([]*CustomPropertyValue, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/properties/values", org, repo)
req, err := s.client.NewRequest("GET", u, nil)
if err != nil {
return nil, nil, err
}
var customPropertyValues []*CustomPropertyValue
resp, err := s.client.Do(ctx, req, &customPropertyValues)
if err != nil {
return nil, resp, err
}
return customPropertyValues, resp, nil
}