Labels searches labels in the repository with ID repoID via various criteria. GitHub API docs: https://docs.github.com/rest/search/search?apiVersion=2022-11-28#search-labels meta:operation GET /search/labels
(ctx context.Context, repoID int64, query string, opts *SearchOptions)
| 290 | // |
| 291 | //meta:operation GET /search/labels |
| 292 | func (s *SearchService) Labels(ctx context.Context, repoID int64, query string, opts *SearchOptions) (*LabelsSearchResult, *Response, error) { |
| 293 | var result *LabelsSearchResult |
| 294 | resp, err := s.search(ctx, "labels", &searchParameters{RepositoryID: &repoID, Query: query}, opts, &result) |
| 295 | if err != nil { |
| 296 | return nil, resp, err |
| 297 | } |
| 298 | |
| 299 | return result, resp, nil |
| 300 | } |
| 301 | |
| 302 | // Helper function that executes search queries against different |
| 303 | // GitHub search types (repositories, commits, code, issues, users, labels) |